Skip to main content
Inspiring
May 21, 2014
Answered

cffile action

  • May 21, 2014
  • 1 reply
  • 564 views

I have the following code to upload file and using accept file type including "image/x-tiff, multipart/x-zip"

The code works for pdf, txt and msword, but I got error message like when I upload zip or tif files.

I would like to know if there is any configuration need to be done at server level,

Your help and information is great appreciated,

Regards,

Iccsi,

<cffile action="UPLOAD" filefield="fleAttachment" destination="#UploadFolder#"

accept ="application/pdf, application/msword, application/vnd.ms-excel, text/plain, image/x-tiff, multipart/x-zip"  nameconflict="MAKEUNIQUE"

result="MyUpload">

Only files of type application/pdf, application/msword, application/vnd.ms-excel, text/plain, image/x-tiff, multipart/x-zip can be uploaded.

Verify that you are uploading a file of the appropriate type.

This topic has been closed for replies.
Correct answer Anit_Kumar

Hi Iccsi,

The mime type for tiff are image/tif, image/x-tif, image/tiff, image/x-tiff, application/tif, application/x-tif, application/tiff, application/x-tiff, zip are application/zip, application/octet-stream and for rar are application/x-rar-compressed, application/octet-stream.

So the below code should work. It worked for me

<cffile action="UPLOAD" filefield="fleAttachment" destination="#UploadFolder#"

accept ="application/pdf, application/msword, application/vnd.ms-excel, text/plain,image/tif, image/x-tif, image/tiff, image/x-tiff, application/tif, application/x-tif, application/tiff, application/x-tiff, application/zip,application/octet-stream"  nameconflict="MAKEUNIQUE"

result="MyUpload">

Regards,

Anit Kumar

1 reply

Anit_Kumar
Anit_KumarCorrect answer
Inspiring
May 21, 2014

Hi Iccsi,

The mime type for tiff are image/tif, image/x-tif, image/tiff, image/x-tiff, application/tif, application/x-tif, application/tiff, application/x-tiff, zip are application/zip, application/octet-stream and for rar are application/x-rar-compressed, application/octet-stream.

So the below code should work. It worked for me

<cffile action="UPLOAD" filefield="fleAttachment" destination="#UploadFolder#"

accept ="application/pdf, application/msword, application/vnd.ms-excel, text/plain,image/tif, image/x-tif, image/tiff, image/x-tiff, application/tif, application/x-tif, application/tiff, application/x-tiff, application/zip,application/octet-stream"  nameconflict="MAKEUNIQUE"

result="MyUpload">

Regards,

Anit Kumar

iccsiAuthor
Inspiring
May 22, 2014

Thanks a million for the information and help,

Regards,

Iccsi,