No announcement yet.

Switch off Image (filename) file check

  • Filter
  • Time
  • Show
Clear All
new posts

  • Switch off Image (filename) file check


    If you use an Image (filename) field to upload images it still checks non-image file extensions even, when leaving the allowed extensions setting empty.

    So an error messagebox shows up, when for instance you try to upload a pdf with an Image (filename) upload field.

    Is there a way in Scriptcase to completely switch off this check? So that an Image (filename) upload field accepts all files and all extensions?


  • #2
    Use type Document(filename) instead.



    • #3
      Ok, that could be done, but a Document (filename) upload field doesn't show a thumbnail, which is nice for the user. Besides that i want all uploads (also a PDF-page) converted to JPG so it fits nicely in the following workflow.

      I would like to use the Image (filename) upload field and then for the non-image formats like a PDF-page convert it to a JPG and show the thumbnail on the AfterUpdate event.

      It works fine, when renaming a .PDF to .JPG in order to circumvent the file-check, but that doesn't work in IE11. It works fine in Chrome and FF. So i want to switch off that (jQuery?) check.

      Would that be possible with some kind of hack?


      • #4
        I'd say you need to create a script that can copy then convert the files to images. Then you need to upload the file and the newly converted image at the same time linking both together. Would be harder to show the preview/thumbnail in the upload field itself, but would be really easy to show thumbnails/preview in a table with the link to download the document!


        • #5
          such a convert script and all that is already ready. the problem lies in the (jQuery?) validation of the Image (filename) upload field as soon as the form with the field is validated and processed. that validation check needs to be switched off. somewhere. anyone have an idea how to do that?


          • #6
            Well the ultimate SC-hack apparently can't be found. So type Document (filename) it will have to be. Thumbnails might have to wait for a follow-up.