ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Uploading file with same name - offer replace option

Open saschabregenhorn opened this issue 5 years ago • 8 comments

When you add files with a file name that exists you always get an „The file exists and cannot be overwritten“ error.

The „Replace“ option in the context menu of a single file does nothing at all.

add-file

context-menu

saschabregenhorn avatar Jul 03 '19 11:07 saschabregenhorn

Hm, it seems to be an issue with your setup. I just checked in a fresh starterkit and it works there. Do you have any special plugins or permissions that could lead to this problem?

bastianallgeier avatar Jul 05 '19 09:07 bastianallgeier

User permissions? No, only admin status. I use the Kirby Builder Plugin – have to admit, I did not try it without the plugin. I did try it in 3 different installations, but all with 3.2 + Builder.

I'll investigate further.

saschabregenhorn avatar Jul 05 '19 09:07 saschabregenhorn

I checked it with a fresh starterkit as well. Added a „simple page“, added images.

When I try to replace a file via the context menu of the filelist, nothing happens. When I open the file (in the panel) and use the context menu there it works.

I use the built-in apache server on a Mac (High Sierra). When I add a new Kirby installation I am asked to change the file permission of media / accounts / sessions and content to use the panel. I've read (https://getkirby.com/docs/guide/troubleshooting/installation#subpages-and-files-not-working) that folders should have 755 permissions which doesn't work in this setup, maybe that's the problem? But a) this never was an issue before and b) why does just one context menu work?

saschabregenhorn avatar Jul 08 '19 11:07 saschabregenhorn

@bastianallgeier i reproduced this issue on 3.2.2 StarterKit

When i drag and drop to images area, i got The file exists and cannot be overwritten error. But i select replace from context menu, works properly like @saschabregenhorn said.

FireShot Capture 707 - Trees - Mægazine - http___localhost_cms_kirby_panel_pages_photography+trees

afbora avatar Jul 12 '19 13:07 afbora

Actually, I think the current process is correct. Because I can upload a file of the same name without seeing the name of the current files in panel and this may cause an error that irrevocable (like losing original content). If I will/want update the file, clicking to replace from context menu is a natural behavior.

We can enhance this in such a way: By clicking on the "add file" or "drag and drop" the file can be warned if there is a file with the same name, Overwrite File can be confirmed like that if possible:

FireShot Capture 748 - Animals - Mægazine_ - http___localhost_test_kirby_1896_p

afbora avatar Sep 10 '19 12:09 afbora

Cool idea. Maybe, there could even be shown a thumbnail of the file the user is about to overwrite. Bildschirmfoto 2019-10-12 um 11 12 31

moritzebeling avatar Oct 12 '19 09:10 moritzebeling

This could (in the future) even be a solution when uploading multiple files: multiselect list of all the already existing files and the user can select which ones to replace. Bildschirmfoto 2019-10-12 um 11 19 17

moritzebeling avatar Oct 12 '19 09:10 moritzebeling

@moritzebeling Let's take one step after the other ;)

distantnative avatar Oct 12 '19 10:10 distantnative