How do i replace a file in uploads but keep the path. #10608
-
Hi all, Im trying to either replace a file and keep the same URL path or use a "slug" field to set the path of the specific document. It would be best I think to allow a "slug" field. However, I understand that it's not a simple just map the path. So replacing the file is probably the best option, but it keeps adding "-n" to the file name so I have to upload twice to get the name. I have tried many hooks, i they keep coming up short. What I'm after is, to upload the file Thanks, in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If anyone comes across this and needs help, I have solved my issue using the beforeOperation and afterChange hooks. This is using a title field to generate the "slug" but it stays consistent. There's a possibility to make this a plugin to add to other documents should we need to...
|
Beta Was this translation helpful? Give feedback.
If anyone comes across this and needs help, I have solved my issue using the beforeOperation and afterChange hooks. This is using a title field to generate the "slug" but it stays consistent. There's a possibility to make this a plugin to add to other documents should we need to...