Cyberduck Mountain Duck CLI

#6715 closed enhancement (fixed)

Rename existing file before moving uploaded file in its place

Reported by: mwoods Owned by: dkocher
Priority: normal Milestone: 4.4
Component: core Version: 4.2.1
Severity: normal Keywords:
Cc: Architecture:
Platform:

Description

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 (1)

Screen Shot 2012-09-26 at 9.30.45 AM.png (80.2 KB) - added by mwoods on Sep 26, 2012 at 4:32:56 PM.
This is mid-upload. The existing file has already been renamed.

Download all attachments as: .zip

Change History (17)

comment:1 Changed on Sep 26, 2012 at 9:50:09 AM by dkocher

  • Resolution set to worksforme
  • Status changed from new to closed

comment:2 Changed on Sep 26, 2012 at 3:35:48 PM by mwoods

  • Resolution worksforme deleted
  • Status changed from closed to reopened

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.

comment:3 Changed on Sep 26, 2012 at 3:54:13 PM by dkocher

  • Milestone set to 4.2.2
  • Resolution set to worksforme
  • Status changed from reopened to closed

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.

comment:4 Changed on Sep 26, 2012 at 3:54:22 PM by dkocher

  • Component changed from ftp to core

comment:5 Changed on Sep 26, 2012 at 4:09:00 PM by mwoods

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.

comment:6 Changed on Sep 26, 2012 at 4:28:00 PM by dkocher

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.

Changed on Sep 26, 2012 at 4:32:56 PM by mwoods

This is mid-upload. The existing file has already been renamed.

comment:7 follow-up: Changed on Sep 26, 2012 at 4:33:58 PM by 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.

comment:8 in reply to: ↑ 7 Changed on Sep 26, 2012 at 5:14:30 PM by dkocher

Replying to 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.

comment:9 follow-up: Changed on Sep 26, 2012 at 5:16:40 PM by mwoods

But I don't want to overwrite the file.

comment:10 in reply to: ↑ 9 Changed on Sep 26, 2012 at 5:18:15 PM by dkocher

Replying to 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.

comment:11 Changed on Sep 26, 2012 at 5:20:19 PM by dkocher

  • Resolution worksforme deleted
  • Status changed from closed to reopened
  • Summary changed from Rename existing file should rename it AFTER upload is complete to Rename existing file before moving uploaded file in its place

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

comment:12 Changed on Sep 26, 2012 at 5:20:28 PM by dkocher

  • Milestone 4.2.2 deleted

comment:13 Changed on Sep 26, 2012 at 5:30:33 PM by mwoods

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.

comment:14 Changed on Sep 10, 2013 at 8:25:50 PM by dkocher

  • Milestone set to 4.4
  • Status changed from reopened to new

comment:15 Changed on Sep 10, 2013 at 8:25:57 PM by dkocher

  • Status changed from new to assigned

comment:16 Changed on Sep 10, 2013 at 9:46:28 PM by dkocher

  • Resolution set to fixed
  • Status changed from assigned to closed

In r12816.

Note: See TracTickets for help on using tickets.
swiss made software