- Assigned to megachriz
- Issue was unassigned.
- 🇺🇸United States daniel-san
This feature is EXACTLY what I've been looking for. Thank you for the work on this.
Just tested with great success for file replacement. But, like previously stated by @chrisck in comment #29 ✨ Replace Existing Files Needs work , the generic file format for display on the field is showing the uploaded file name, but the url is linking to the tokenized file name and newly uploaded, different file. Which is really great!I am running Drupal 9.5.9
File (Field) Paths - 1.0-beta6
Used the patch from comment #39 ✨ Replace Existing Files Needs work
Hoping to be able to help in getting new work tested and moved a bit forward. My small team is going to be at Drupalcon Pittsburgh this upcoming week and maybe there are others that want to join together to get this issue worked out.
- 🇦🇺Australia imclean Tasmania
Backtracking on my earlier comment, I'm not sure Filefield Paths is the right place to determine what should happen when a file already exists. It's a great module for specifying the desired location for a file, but it isn't responsible for initiating the upload.
For example, Feeds → allows you to specify whether to replace or rename an existing file. This choice isn't respected when using Filefield Paths.
DropzoneJS also has its own logic and I expect other modules will as well.
It's tricky because each module has its own configuration.
- 🇺🇸United States j-barnes
Currently having issues where our content uploaders have two tabs open and have an attached document, and try to attach another document on the other tab (same node) it appends an underscore. This makes sense because the temp folder already has that file, but would be great if there was some type of warning. It looks like this would need to be changed at the file widget level though, and require something similar to the media entity file replace.
- miiimooo Europe
One problem I see with this occurs when used with multiple file field field:
In HTML5 you can drag & drop a list of files into a multiple file input element. When re-uploading a file with the same name the user might expect that the file is overwritten, which also happens with this patch. But in the file widget the file is listed twice and in the field value two references are stored to the same managed file entity. Manually removing one of the entities is save but still it would be better if the files list would be clever enough to filter for duplicates.
- 🇮🇳India sakshi@17
I’ve applied the patch mentioned in #39 and noticed the following issues:
When a media file is moved from one location to another, an incorrect redirect is being created. Specifically, the redirect has the same source and destination URLs.
Additionally, I observed that when a media entity is created, a redirect is being generated from the temporary location to the permanent one. This redirect is unnecessary and should be avoided.
Adding a new patch that addresses both of these issues.
- 🇩🇰Denmark ressa Copenhagen
I am also looking for this, using the "File (Field) Paths" module in a migration, and it seems like
_0.jpg
files are created when I runmigrate:import --update
, so I need to rollback, to not get a lot of duplicate files.