Fileupload element Ajax uploads can't be deleted

boyjah

Member
I have seen a few threads about this but have yet to see a solution.

When using Ajax Uploads for the Fileupload element, if a user clicks the X (delete) next to an uploaded file, it does not actually delete. It is still saved to the database and the deleted file is still included in the associated email (Options tab, Email files set to YES).

If there is a way to fix this I would like to know. But seeing as other forum posts about this haven't resulted in a solution...

IS THERE A WAY TO HIDE THAT X (delete) mark at the end of the uploaded file name and progress bar so that users are not led to believe that they can actually delete the file they have uploaded?

Screen Shot 2022-01-11 at 14.11.27.png
 
I can't replicate.
Clicking the X will show an alert "Do you want to delete the file from the server?" and with OK the file is deleted.
 
I can't replicate.
Clicking the X will show an alert "Do you want to delete the file from the server?" and with OK the file is deleted.

Not working that way for me (and many other users). Yes, when we click the X we see the message confirming that we want to delete the file and indeed the file disappears from the page, but when you say that the "file is deleted" does that mean that it is not saved to the database, to the images folder and not sent as an email attachment? Because that is NOT what we are finding. We have changed every possible combination of settings associated with this element, but the result is always the same. Deleted files are still being saved to the database, to the images folder, and sent as an email attachment. For example, we have it set to the default of Max files = 4. A user can upload 4 files, delete 2 of them and then upload 2 more. When they click the submit button, 6 files are saved to the database and sent as email attachments: the Max files limit of 4 plus the 2 that they deleted.
 
Last edited:
Ah, ok, you mean trying to delete a file directly after the ajax upload, before saving the record?
Yes, this seems to be an issue.
 
Ah, ok, you mean trying to delete a file directly after the ajax upload, before saving the record?
Yes, this seems to be an issue.

Exactly that. If there is no viable resolution to this, we want to at least be able to disable the confusing and incorrect X mark.
 
You can hide it via CSS, I don't know the exact syntax out of my heart, something like
:not(id^="alreadyuploaded"]) td.plupload_file_action {display:none;}
 
Correction (there was a typo)
:not([id^=alreadyuploaded]) td.plupload_file_action {display:none;}

or (first hide all, then display already uploaded X; not all browsers support :not)
td.plupload_file_action a {display: none;}
[id^=alreadyuploaded] td.plupload_file_action a {display: block;}
 
We are in need of some funding.
More details.

Thank you.
Back
Top