Issue with Duplicate File Names in Media Library – Fix Needed
-
Hi,
I’m currently using WPUF to allow users to submit products via the front-end on my website. I’ve encountered a serious issue related to file/image names being the same.
Here’s what’s happening:
1) Product/Image Submission Issue:
- User John submits a product (or post) with a featured image (field “
Product image” or “Featured image“) that has the same name as an image already in the media library (e.g., image.jpg). - If the image is identical, the product/post is submitted and will use the existing image in the media library. This might seem fine, but here’s the problem:
Major Problem:
- If John decides to delete this image via WPUF, whether before or after the form submission, the form seems to indicate that the deletion is not possible, likely because the image was previously uploaded by another user.
- However, despite this, the image is actually deleted from the media library. This inadvertently affects other products/posts that used the same image, which John should have no control over. And this happens without any warning or indication to the user.
2) Downloadable File Submission Issue:
- John submits a product (or post) with a downloadable file (field “
Downloadable Files“) that has the same name as an existing file in the media library (e.g., recipe.pdf). - The file doesn’t get uploaded, and instead, the product/post will use the existing file in the media library, which might not even be the file John intended to upload.
Major Problem:
- If John decides to delete this file via WPUF, the form seems to indicate that deletion isn’t possible, but the file is actually deleted from the media library.
- Other products/posts that were using this file will now have their file deleted as well, even though John should not have any control over those!
Worst of all, this happens without any warning or indication to the user, which can lead to unintended data loss.
Proposed Solution:
To avoid this issue, I suggest adding a unique code (such as a timestamp or post ID (better post ID?)) to the end of each file/image uploaded via WPUF. The affected fields would include:
- “Product image”
- “Product Image Gallery”
- “Downloadable Files”
- “Featured image”
- “File Upload”
This would prevent any conflicts with files that already exist in the media library and eliminate the risk of one user unintentionally deleting files or images that belong to other products/posts.
I hope my explanation of the problem is clear. This is a critical issue, and I hope it can be addressed as soon as possible.
Thank you for your attention to this issue.
- User John submits a product (or post) with a featured image (field “
You must be logged in to reply to this topic.