Opened 4 years ago

Last modified 4 years ago

#12307 reopened Patch

[Patch] Auto-update proposal

Reported by: Marco Meyer Owned by:
Priority: high Component: FileZilla Client
Keywords: auto-upload Cc:
Component version: 3.51.0 Operating system type: OS X
Operating system version: Big Sur

Description

Dear Sir,

I would like to make a proposal for automatic uploads of small files to avoid the popup window requesting confirmation.

I have been using this patch since quite some time now and I saw that many people over time keep asking for that. I also know this was already discussed several times.

Anyhoo, this patch includes a safe upload (avoiding file corruption) of the modified files and only applies to files smaller than 1MB.
NB: The current patch is quite simple and do not provide any customization of the parameters (e.g. user could chose the max size for automatic upload or to disable/enable the feature by default)

Thank you for your consideration.

Best regards,
Marco

Attachments (4)

edithandler.2.cpp (53.9 KB ) - added by Marco Meyer 4 years ago.
Updated version (with filesize estimation and stable file check included)
edithandler.2.h (6.6 KB ) - added by Marco Meyer 4 years ago.
edithandler.cpp (54.0 KB ) - added by Marco Meyer 4 years ago.
Including some cleaning and comments about the procedure
edithandler.h (6.6 KB ) - added by Marco Meyer 4 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by Tim Kosse, 4 years ago

Resolution: rejected
Status: newclosed

Files of any size can get corrupted. The size of the file is not known until after the editor has finished writing to it. It is not possible to determine programmatically when the editor has finished writing to it, the user has to tell FileZilla when the editor has finished writing to the file.

comment:2 by Marco Meyer, 4 years ago

Of course, the size of a file can at least be estimated. Here, the point is not to know the exact size. But whether it is larger than a specific value.
Small files such as < 1MB is anyway written in few ms.

Knowing this, you don't mind about whether the editor has finished to write the file or not anyway. Here the point is to make an arbitrary copy of the file and compare it to the file being potentially written by the editor

1) If the file pass the test for couple of seconds then you can safely copy it.
2) If not you keep waiting or just show the standard DisplayNotification window.
3) If the user is still being writting then you just wait for the upload procedure.

In my code I have been checking once, but you can add some delay (few ms) and make sure the copied file is stable over few seconds or more. This is a much reasonable as asking the user to upload. At least this could be made as an option and not by default anyway.

Please consider this option, I have been using it since quite some time.
I think it would be pretty much appreciated.

by Marco Meyer, 4 years ago

Attachment: edithandler.2.cpp added

Updated version (with filesize estimation and stable file check included)

by Marco Meyer, 4 years ago

Attachment: edithandler.2.h added

comment:3 by Marco Meyer, 4 years ago

Resolution: rejected
Status: closedreopened

by Marco Meyer, 4 years ago

Attachment: edithandler.cpp added

Including some cleaning and comments about the procedure

by Marco Meyer, 4 years ago

Attachment: edithandler.h added
Note: See TracTickets for help on using tickets.