Suggestion: auto upload when editing files

Need help with FileZilla Client? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
jumpfroggy
503 Bad sequence of commands
Posts: 18
Joined: 2007-08-25 16:14

Suggestion: auto upload when editing files

#1 Post by jumpfroggy » 2008-10-31 19:50

I searched and found this closed topic:
http://forum.filezilla-project.org/view ... f=2&t=6016

The problem: When I right click on a server file and hit "View/Edit", anytime I modify the file I get a prompt in Filezilla:

Code: Select all

A file previously opened has changed:
(filename)
Upload this file back to the server?
Solution: I'd love to have this automatically upload anytime a modification has happened.

My workflow would be this:
-Right click on a file on the remote server.
-Select "View/Edit"
-Edit the file, save
-Filezilla would automatically upload the file
-When I'm done, I just close the editor. Since the file is in the temp dir, it wont be further modified by any other file. When filezilla closes, it can delete all "View/Edit" files in the temp folder.

I understand this is risky, so I think this should definitely be an option in the settings. In the previous thread, botg said that these dialogs are necessary to avoid data loss, especially that Filezilla can't determine when a file is done being edited. To assist this, I'd suggest that Filezilla automatically waits a certain amount of time (1 second) after a modification, then checks again. If no more modification, upload. If there have been, wait another second, repeat. This wont handle things like files that are updated continually by other programs, but it will be fine for hand-edited files that are saved infrequently (which is really what this suggestion would be useful for).

I'd suggest that the option would be on the dialog.

Code: Select all

A file previously opened has changed:
(filename)
Upload this file back to the server?
[x] Always upload this file during this session.
This way it's convenient, but requires user action to activate. It's clear what it does, and is something that most users can/will ignore. The only UI problem then is how to stop automatically updating a file. The easiest thing is to close Filezilla and then reopen (since that terminates the "session"). A more complicated way would be to have a notification bar or popup show any auto-updating files. I think the first way would be sufficient, since getting overly complicated wouldn't really help here. Also, the user can always close the file in the editor and ignore it, since it's in the temp folder.

Again, I think this is an advanced feature that would be very appreciated. I think it is a risky feature for newbies or those not aware of its limitations. But I also think that this suggestion would allow advanced users to use it, while still not causing problems for ignorant users.

Please be polite in your responses. That should go without saying, but a lot of the users in the previous thread decided to start name-calling instead of discussing the problem at hand. Let's keep it civil.

User avatar
botg
Site Admin
Posts: 33056
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Suggestion: auto upload when editing files

#2 Post by botg » 2008-10-31 21:27

If there's an option, everybody will be just enabling it, ignoring the risks. And then loudly complain the next day when all their files are corrupt.
But I also think that this suggestion would allow advanced users to use it
Now assume you're not using Windows or have the files on a network share that does not use mandatory locking (i.e. any share not hosted by Windows). The result is that the file gets uploaded automatically while it is still being written to by the editor, leading to a garbage file on the server.

jumpfroggy
503 Bad sequence of commands
Posts: 18
Joined: 2007-08-25 16:14

Re: Suggestion: auto upload when editing files

#3 Post by jumpfroggy » 2008-10-31 22:22

botg wrote:If there's an option, everybody will be just enabling it, ignoring the risks. And then loudly complain the next day when all their files are corrupt.
But I also think that this suggestion would allow advanced users to use it
Now assume you're not using Windows or have the files on a network share that does not use mandatory locking (i.e. any share not hosted by Windows). The result is that the file gets uploaded automatically while it is still being written to by the editor, leading to a garbage file on the server.
I understand that there are risks. Perhaps this could be an advanced feature that would be enabled in the settings window. I understand that many users need to be protected from themselves, but there should also be a way to give advanced users advanced features. Firefox does this well with "about:config" which is near impossible for beginners to stumble on or change randomly, but allows advanced users to do almost anything they need.

Regarding the network share, I agree that it's a risk. But first off, I think it'd be very rare to have your system temp folder be on a share drive. Possible, yes. But incredibly rare. But I think the real kicker here is that if filezilla uploads a corrupted file this way, then *no big deal*. It's a temp file you're currently editing and have just saved changes to, not files that are being modified by another program automatically. If you edit the file and it auto-uploads, then you'll notice the changes on the server right away and you'll also notice if there are any problems.

Again, this is an advanced feature with risks. If a user doesn't understand the risks involved, then I agree with you they might have trouble. However, if an advanced user understands the risks involved and still opts to use this, then the edge cases like the network share problem don't really matter.

So I think the real question is making this an option that a) wont be easily used by novices, and b) advanced users can understand the risks of and still opt to use it.

The settings option could be put in the "Settings > File editing" dialog page. The option would be a checkbox "Allow automatic uploading for modified files". This would enable the "Always upload this file during this session" checkbox in the file modification popups. If necessary, when the user checks the "Allow automatic uploading for modified files" checkbox then filezilla could even throw a modal dialog explaining the risks involved. They might skip over this, but they'll at least understand that they're enabling something more risky.

I understand that we're trying to protect users from themselves. But that has to be balanced with allowing users to do what they need to do. Software can only be so "smart" and "helpful" before it gets in the way. Layered functionality (like hiding advanced functionality from novice users) seems like a good solution for this.

Any thoughts? Thanks! I truly do prefer filezilla to the other FTP programs I've used, and I appreciate the effort. I think I switched over about 5 years ago and never really felt the need to look for an alternative.

da chicken
226 Transfer OK
Posts: 619
Joined: 2005-11-02 06:41

Re: Suggestion: auto upload when editing files

#4 Post by da chicken » 2008-11-01 05:03

@botg:
Have you looked into inotify or something like fsniper? I know COM+ events do this kind of thing under Windows.

Then again, there's an awful lot of abstraction code between Linux and FileZilla. FZ --> wx --> GTK --> GVFS/GIO/GnomeVFS --> Linux --> File system.

Or something like FAM?
http://oss.sgi.com/projects/fam/

It may be useful for determining when the local directory listing has changed. May be beyond the scope of what you want to do, though, too. :mrgreen:

User avatar
botg
Site Admin
Posts: 33056
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Suggestion: auto upload when editing files

#5 Post by botg » 2008-11-01 09:32

Determining when it has changed is not the problem. The problem is deciding when it is safe to upload the changed files.

jumpfroggy
503 Bad sequence of commands
Posts: 18
Joined: 2007-08-25 16:14

Re: Suggestion: auto upload when editing files

#6 Post by jumpfroggy » 2008-11-01 14:41

botg wrote:Determining when it has changed is not the problem. The problem is deciding when it is safe to upload the changed files.
Hey botg,
What did you think of my idea to put the feature in, even if it's just for advanced users and carries big huge warning signs? How do we get advanced functionality into filezilla while still keeping it safe/simple for others? Thanks!

revision29
500 Command not understood
Posts: 1
Joined: 2008-11-06 21:03
First name: Joe
Last name: Schneider

Re: Suggestion: auto upload when editing files

#7 Post by revision29 » 2008-11-06 23:05

I have an idea... Why not do 2 sequential md5s on the file in question. If they are different, then the file is obviously being written to. Keep a loop going until several md5s match sequentially to check for when the file is not being written to. This whole process should be triggered when the date/time and / or other file stats change. After the file is uploaded, an md5 needs to be run on the file again and see if it changed during upload. If it did, then throw an error or upload the file against since it changed.

lrdesign
500 Command not understood
Posts: 1
Joined: 2012-05-24 16:16
First name: Lucas
Last name: Rodenbush

Re: Suggestion: auto upload when editing files

#8 Post by lrdesign » 2012-05-24 16:25

:!: i concur with jumpfroggy and revision29.

<< Making this an advanced feature is the best way to keep from annoying those not privy to this... >>

8) please consider the following a compliment, as i am very picky with my coding software and have been in constant pursuit of this behavior on pc ever since i started using it for web development about 5 years ago with http://pspad.com (which is good, but is far too constrictive to my monitor workspace, really annoying):

i am primarily a mac user and i use http://codingmonkeys.de/subethaedit in conjunction with http://panic.com/transmit on that platform (i have big clients and rely heavily on this workflow) and i require this behavior. :idea: please make it an option. it is incredibly annoying to have to authorize this every time i save and have to switch between two applications just to continue working (follow?). i ditched pspad this morning for its clunkiness! and am now using Filezilla exclusively (in conjunction with http://notepad-plus-plus.org) if this one little thing gets done. otherwise, i will be forced to look elsewhere. everything else about this application functions as is to be expected for this workflow, just not this one feature. YOU ARE SO CLOSE!!! :idea: please do just this one thing. :lol: i see a 'watch local files and prompt to upload modifications', but this does not work as i thought it might. :? i would prefer not have to walk into the next room and use my entertainment system where all my macs are every time i want to edit a webpage the way i am used to (i have a projector, this setup is used for collaborative media, making music, watching movies and has couch seating, which is not the most ergonomic or efficient work setup, especially under deadlines ... i have sacrificed my macs to the living room for practicality) as my work pc is smokin' 8) ... and perfectly capable of fulflilling all of my requirements once you implement this one feature! 8) thanks in advance! :D

do you need a donation or something? :D

Mukelo
500 Command not understood
Posts: 1
Joined: 2012-07-03 19:49
First name: Tero
Last name: Santalahti

Re: Suggestion: auto upload when editing files

#9 Post by Mukelo » 2012-07-03 19:57

All right, I registered only to post for this;

I've been using WinSCP for years. Recently, it has started to give A LOT of problems for me (unsolved). I found that FileZilla works a lot better in many ways, except I CANNOT EDIT AND SAVE without that goddamn are-you-sure-prompt. Pardon my language, but it is really annoying and kind of spike in the flesh.

Guaranteed, I'm an ex-FileZillar if I cannot have the option to make my own mind. That option would be: do not ask.

Post Reply