Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename existing file before moving uploaded file in its place #6715

Closed
cyberduck opened this issue Jun 12, 2012 · 12 comments
Closed

Rename existing file before moving uploaded file in its place #6715

cyberduck opened this issue Jun 12, 2012 · 12 comments
Assignees
Milestone

Comments

@cyberduck
Copy link
Collaborator

@cyberduck cyberduck commented Jun 12, 2012

ff1fec5 created the issue

When overwriting a file that already exists, Cyberduck gives various options including "Rename existing file". However, this function doesn't perform the way I would expect it to. It renames the existing file, throwing it offline, and then uploads the new one. The file remains inaccessible via the old URL until the upload is complete.

What it should do is keep the existing file in place, upload the new file with a temporary filename and then once the upload is complete, rename the old file and then rename the new file to the correct name. This means that the file will remain accessible while the upload is occurring.


Attachments

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 26, 2012

@dkocher commented

Use the option Upload with temporary filename.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 26, 2012

ff1fec5 commented

No, that option just renames the temporary file (I had it switched on already). What I want to do is have the existing file keep its name until the upload is complete, at which point it has the current date and time appended to it.

How to reproduce:

  1. Upload a file.
  2. Re-upload the same file and choose Rename Existing File.
  3. Cancel the upload before it is complete. You will see that the existing file has already been renamed even though the upload was not successful.

What it should do is rename the existing file only when the upload is complete.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 26, 2012

@dkocher commented

This is poorly documented. You have to choose Overwrite so the existing file does not get touched before the transfer and is overridden only after the file is renamed from the temporary upload name to the target file name.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 26, 2012

ff1fec5 commented

I don't want to overwrite the original file. I want to rename the original file so that the original and the new file exist side-by-side. I can do this with the Rename Existing option in the overwrite prompt and it works but my enhancement request is for it do this only when the new file has finished uploading.

The sequence of events is currently:

  1. Upload new file with temporary filename. Original file is renamed to a unique filename.
  2. Upload finishes.
  3. Now rename the temp file to the old file's filename.

But it should be:

  1. Upload new file with temporary filename. Original file is untouched.
  2. Upload finishes, now rename the existing file to a unique name.
  3. Now rename the temp file to the old file's filename.

The reason this is a problem for me is because sometimes I have to upload large files or I have a poor internet connection so the existing file is thrown offline for 10 minutes or more. I have to counteract that by uploading a different filename and then renaming everything manually.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 26, 2012

@dkocher commented

The additional requirement you describe is to keep a copy of the existing file and not replace it. With the Upload with temporary filename option the existing file is not touched until after the upload is complete. It is then replaced by moving the uploaded file in its place.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 26, 2012

ff1fec5 commented

Ok, in that case it's not working correctly. See the attached screenshot that was taken mid-upload. The existing file has already been renamed.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 26, 2012

@dkocher commented

Replying to [comment:7 mwoods]:

Ok, in that case it's not working correctly. See the attached screenshot that was taken mid-upload. The existing file has already been renamed.

As I said, make sure to choose Overwrite in the existing file prompt.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 26, 2012

ff1fec5 commented

But I don't want to overwrite the file.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 26, 2012

@dkocher commented

Replying to [comment:9 mwoods]:

But I don't want to overwrite the file.

It will get overridden by moving the uploaded (with a temporary filename) in its place. First renaming the original file is not something we currently support.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 26, 2012

@dkocher commented

Clarify ticket title that we want the features Rename existing file and "Upload with temporary name" combined.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 26, 2012

ff1fec5 commented

Just to clarify, the Rename Existing option works for me but the rename happens too early. I can see how this would be a problem if the user does not have temporary filenames switched on though.

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 10, 2013

@dkocher commented

In 794e94d.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants