tfatool icon indicating copy to clipboard operation
tfatool copied to clipboard

Missing remove function in upload.py

Open thopiekar opened this issue 7 years ago • 4 comments

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?

thopiekar avatar Sep 23 '17 19:09 thopiekar

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 avatar Sep 23 '17 22:09 TadLeonard

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

TadLeonard avatar Sep 23 '17 23:09 TadLeonard

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

AndCycle avatar Oct 12 '17 13:10 AndCycle

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

TadLeonard avatar Sep 12 '18 07:09 TadLeonard