v2-hub icon indicating copy to clipboard operation
v2-hub copied to clipboard

FR: Add "replace" function for assets

Open lukeagsmith opened this issue 7 years ago • 4 comments

A common issue we have is clients uploading new versions of existing files.

This can either break hard coded links or, if using the asset fieldtype, create a new link and leave external links pointing at old files.

At the moment if a client uploads a file with the same name a new version is automatically created. Sometimes this can prevent data loss, other times it spawns multiple versions of files.

Trying to teach a client to go into the asset browser, delete a file and then upload a new one with exactly the same name seems to be a hurdle a lot of them struggle with. Not to mention you have to re-enter any meta data for the file.

Therefore a function to replace a file would make it easier for clients who don't think about naming and external links etc. It would also be a workflow improvement for those who do.

My initial thoughts for this feature would be to add it to the file details overlay. That way it is directly available by using the edit button from the assets field type.

Uploading a replacement file would rename whatever is uploaded to exactly the same filename as the existing asset.

lukeagsmith avatar Apr 25 '18 14:04 lukeagsmith

Second that

The button is already present for a long time and sad that it has no functionality 😢

                        <!--
                        <button
                            type="button" class="btn"
                            @click.prevent="replaceFile">Replace File
                        </button>
                        -->

rrelmy avatar Aug 21 '19 08:08 rrelmy

I really need this.

anthubbard avatar Nov 02 '19 01:11 anthubbard

Any news on this?

Elwood-P avatar Jan 25 '22 10:01 Elwood-P

@Elwood-P For v2 this will not happen but for v3 there are 2 different feature requests

  • https://github.com/statamic/ideas/issues/401
  • https://github.com/statamic/cms/issues/6610

rrelmy avatar Jan 25 '22 13:01 rrelmy