Open thopiekar opened 7 years ago
Thanks for reporting this, @thopiekar. I created a PR to make deletion possible via flashair-util
and to ease file deletion in code that people might write around the tfatool
package.
I no longer have a FlashAir SD card. If you can assist me with the functional testing of the PR branch, I'll merge it ASAP.
To be clear, there was already a delete_file()
in upload.py. It was used internally in tfatool.sync
to delete remote files when they were deleted locally in a synced directory. This just makes it look 'n' feel more like the other functions like it (e.g. it handles a remote_dir=...
argument).
I can see there is such a use case for delete,
as I am previous use Eye-Fi, Eye-Fi do download and clear out old picture to maintain enough free space
@thopiekar, you may find the discussion in issue #15 useful for getting a delete function working properly. You can either do what was done in that comment thread or wait for a new pip install
-able release in a few weeks.
According to https://flashair-developers.com/en/documents/api/uploadcgi/#DELETE there is also a command to remove a file. Are there any plans to implement that?