• Hi

    I have a few questions on file management for the plugin.

    Firstly, I’ve noticed that when I upload a file via the ‘Add New’ UI or edit a ‘File’ post type, if I upload a file with the same filename as a one already uploaded, it overwrites it.

    It does not warn that a file with that name already exists, or does not automatically rename the file, or generate date-based folder structure in a comparable way to the standard WP uploads.

    To stop accidental overwrites are there features or settings to mitigate this?

    Secondly, when an uploaded attached file is deleted from a File post, or the entire post is deleted, the original uploaded file remains in the ‘download-manager-files’.

    Is there a way to identify unused files that are no longer attached to a File post? This way they can be deleted and keep the overall size of the website down.

    Any help would be appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @castoruk
    Hope you are well.
    In order to prevent the accidental file overwrite there is a Rename New File option available with the WPDM Pro version only like this.
    And currently, it’s not possible to identify the unused file however you can delete the unused files through the Asset Manager.
    Thank You

    Thread Starter Castor

    (@castoruk)

    Hi HumayonK

    I’ve discovered that files automatically have their filenames changed if the ‘sanitise filename’ setting is disabled.

    In relation to my second question. I’d guess I can run a SQL query to find ‘deleted’ files. I’m guessing the files are recorded in the ahm_assets table in the DB, (unless I’m wrong), and the custom post type is a ‘wpdmpro’. I just cannot spot the relationship in the DB. Any help?

    Hello @castoruk
    In our test, we found that file names are not getting changed while the sanitize option is disabled. Make sure that you are using the latest version.
    Can you please clear your site cache? Also, there can be a conflict with another plugin, can you please enable/disable other plugins for checking, you may also switch the theme to another for checking, please let me know then.
    About your 2nd question, ahm_assets is for Asset Manager.
    However, we are going to add a new option in the next/future update under the settings section like this delete associated files when the package gets deleted.
    So, please cooperate and spare us some time.
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘File rename, overwrite and deletion.’ is closed to new replies.