Is the "Replace" field/file in assets supposed to replace or create a new asset?

  • It seems when I open an asset in the assets section and then choose a new file under "Replace file", the replacement file is actually added as a new file. Is this intended behaviour?


    I understand the use case of CDNs or caching, but the field label has confused a few of my customers as it doesn't replace the file, but creates a second one and the user is forced to select the new file (possibly in multiple locations).

  • drewm

    Approved the thread.
  • Could you clarify? To me content would mean the bytes of the file, but that's not the case.


    Is there a way to disable the option to replace a file as it's cause multiple support requests from clients.

  • I mean content as in the content you are managing in the content management system. When you replace an image with another image, the content item is updated.


    The file on the file system is not replaced - a new one appears alongside it.

  • Hmmm, that doesn't seem to be working. I have an Image content field on a page, but when I replace the asset in Assets, the image is still the same on the page and in the Perch admin. The new image has been added to the Assets. I can select the new image in the content field, but it's still the original file.


    PHP
    1. Perch Runway: 3.1.4, PHP: 7.3.2
    2. Installed apps: content (3.1.4), assets (3.1.4), categories (3.1.4), perch_blog (5.6.1), perch_forms (1.12), perch_twitter (4.0)
    3. App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', 'perch_forms', 'perch_twitter', );