Closed Bug 1214845 Opened 9 years ago Closed 3 years ago

FileLink: define behavior when cloud file would be overwritten by a new file

Categories

(Thunderbird :: FileLink, defect)

38 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: peci1, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0
Build ID: 20150929144111

Steps to reproduce:

Use Box FileLink integration (probably other providers, too, if there still remain any other).

Send an email with attachment named test.txt uploaded via FileLink.
Do the same again.


Actual results:

An error occurs saying the file cannot be uploaded when doing it for the second time.


Expected results:

Here we should gather opinions and define the desired behavior.

My ideas:

1) automatically rename the file to e.g. "test.txt (1)" until an unused filename is found
2) display an input box asking for the corrected filename (might have the above pre-filled)
3) ask the user if he wants to overwrite the cloud file, update it (Box can do it, I don't know if others) or rename the uploaded one

I'd vote for number 3).
Depends on: 1045845
(In reply to Martin Pecka from comment #0)
> 3) ask the user if he wants to overwrite the cloud file, update it (Box can
> do it, I don't know if others) or rename the uploaded one

This is probably reasonable. Would require a bit more UI work though.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Nowadays, this is all within the scope of the cloudFile add-on. It knows how to communicate with the server. If it sees a file with the requested name already on the server, it could pick a different name before uploading it. If the server does not allow querying the existing files, it could retry after the failed attempt with a timestamp or other means of uniqueness added to the file name. The add-on can define a standard behavior for such cases, or prompt the user on each (and let the user pick a new name).

cloudFile API:
https://webextension-api.thunderbird.net/en/91/cloudFile.html

Our community channels for support on add-on development:
https://developer.thunderbird.net/add-ons/community

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.