Verify uploads to prevent corrupt files

Hello!

I am using the auto-upload feature of the Nextcloud iOS app to upload my photos and videos when I am on wifi. It has happened a few times since I started to use Nextcloud a few years ago that some uploads fail. I guess they are retried. Just the other week I realized that some videos that was uploaded was corrupt on the server. The file manager claimed the file size was around 50 MB but the actual file size on the server was less than 10 MB and eventually the viewing (and download) failed. How can this be prevented?

Is there some kind of mechanism to verify that the uploaded file was correctly uploaded? (or should it be implemented?)
If an upload fail, an error message is shown for a short while. But for cases that I don’t look at the screen during the upload process, and preferably I would like the upload to just be done in the background without me caring about it, how about having an error log in the app so I occasionally can check for failed uploads? What do you think about that?
Or can I check somewhere in logs on the server (either Nextcloud logs or apache logs)?

Thank you for a great server software and apps!

Hans

For the records, I use NC 17.0.3, Ubuntu 18, Apache and ios app 2.25.9.2.

I had the same problem. The NC client incorrectlly reports that the file is fully uploaded / synced. I left my NC client on my iphone to run in the background and checked back the next day and the video files were playable. This issue echos a zero byte reporting issue that I am following on here in the MacOS finder. I think the Dev’s need to have a peak on how the NC client reports and verifies finished and/or ongoing sync jobs.

Thank you for your input!

By chance I checked the Trashbin today and found the files that were corrupt were still in there. I remember I removed the files, but the bin was obviously not emptied. This was good because I also checked the files_trashbin directory (on the server, in the data directory), and in there is three sub-directories. The files directory which hold my corrupt files as displayed in the Trashbin view, and also versions which contains old versions of deleted files. And I had an old version of all corrupted files that was actually the original file. The conclusion is that the original upload from my iphone client was correct but for some reason must a corrupt version of the file been saved after that (as a new version). Luckily, thanks to the file revision functionality, the original files could be restored after restoring the deleted files and then restore a previous version of the files.

I don’t know at the moment why the files got corrupted in the first case. I also use NC sync client on my laptop, perhaps some syncing issue occurred. I am also glad that the uploads from my phone was not the issue in this case!

propellerhead, I suggest you also check your version directory on the server, unfortunately it is not shown in the web interface.