mandarons / icloudpy

iCloud web service interface library in Python
Other
188 stars 19 forks source link

Update content of icloud file #37

Closed Ryxwaer closed 7 months ago

Ryxwaer commented 11 months ago

I'm looking for the best practice to update the content of a file using icloudpy. Currently, my approach involves deleting the file from iCloud and then uploading its updated version with the same name. However, this method isn't always effective as sometimes the file fails to delete from iCloud. When this happens, the new file is uploaded with an index number appended to its name.

Has anyone else encountered this issue and found a solution?

mandarons commented 8 months ago

It looks like there is a way to only post update with changed data to an existing file. Unfortunately, that feature isn't implemented yet. It seems implementing file update feature in this library is quite complex due to encryption and other complexity. It doesn't seem worth the ROI at this point. So until that happens, your best bet is to delete the file and re-upload it with same name.