TadLeonard / tfatool

Tools for managing files with the Toshiba FlashAir wireless SD card
MIT License
36 stars 8 forks source link

Missing remove function in upload.py #8

Open thopiekar opened 7 years ago

thopiekar commented 7 years ago

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?

TadLeonard commented 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.

TadLeonard commented 7 years ago

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).

AndCycle commented 7 years ago

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

TadLeonard commented 6 years ago

@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.