2 issues with fileupload element

jfquestiaux

Well-Known Member
I use the fileupload element with AJAX loading (html5) and I have two important problems:

  1. I want to upload only PDF files, so I put .pdf in "Allowed File Types" but I was able to upload any kind of files (.doc, .txt, .jpg). That's the major issue.
  2. When you add files in the list of files to upload, you have a X to delete files. As long as they are not uploaded, that's fine but once they are uploaded, the X is still there and if you click it, you get a message asking to confirm the deletion, which is fine of course except that contrary to the message, the files are not deleted from the server nor the database table. I am not sure there is something you can do about this, but this is a disturbing behavior for the user.
2013-10-03 18.05.20.png2013-10-03 18.06.06.png 2013-10-03 18.07.46.png

Tested with GitHub 2023.
 
Update: if I use the "normal" upload, I still can upload any kind of files, even though i limited it to ".pdf,.PDF".
 
thanks for that report, both of these should be fixed now in github

-Rob
 
Hello Rob.
I updated to GitHub 2060 and here is the situation:

  1. The detection of the allowed extension works now (at least on AJAX - not tested with normal upload)
  2. There is no changes with the deletion of files (with AJAX).
Here are the tests i've made:

  1. Upload 1 PDF file - OK
  2. Upload 2 PDF files - OK
  3. Upload 2 PDF, then delete 1 (before submitting the form): message file deleted but the 2 files are actually still on the server and they are both in the database once you submit the form
  4. Upload 1 PDF and 1 .DOC: message "wrong extension" and nothing show in the upload box - so choose again the PDF file, upload it and save: the file is 2x on the server (with different names because I have obfuscate on) but only once in the database
Tested with FF 24.
 
what file name are you uploading and what settings do you have for the other tabs in the file upload element?
 
I tested with the following files: translator_euf.pdf, translator_euf.doc, Formation_mission_locale.pdf with the settings in the pictures joined.
Thumbnail, crop, download are set to "No" and there is an unpublished "notempty" validation on the element.
Probably the most important, this element is alone in its group on the second page of a 3 pages form.
ajax.pngdisplay.pngoptions.png
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top