Apr 15, 2015; 15:41
French, Shelane
uploading files and file type
Server is RHEL 6.5, Lasso 8.6
So I have a file upload script where I am expecting files in the form of
Word, PDF, or images. I have a map of mime types with the extension that
they should carry that I check when the file is uploaded. For some reason,
some (not all) of the pdf files uploaded are not having their mime-type
reported correctly, so it's getting kicked back to the user. I've see
these types so far:
multipart/form-data
application/download_file
I am just doing this:
iterate(File_Uploads, #File_Temp);
local('filetype' = $File_Temp->find('type'));
//the rest of my code
/iterate;
Whenever I get an invalid file type, I'm having my script email me with
the action params and client_browser info. This was the one I got this
morning:
array: (pair: (-session)=(cand_letter:3283B07F0a22b14214wh5D34F5CA)),
(pair: (token)=(3283B07F0a22b14214vX5D3536E5)), (pair: (refName)=(Duncan
Temple Lang)), (pair: (-upload.realname)=(KarenYinYeeNg.pdf)), (pair:
(-upload.name)=(/tmp/lassoD7e0wf30243544.uld)), (pair:
(-upload.type)=(multipart/form-data)), (pair: (-upload.size)=(191273)),
(pair: (-upload.fieldname)=(file_letter)), (pair:
(-upload2.fieldname)=(file_letter)), (pair: (LetterRec)=()), (pair:
(submit)=(Continue))
reported type: multipart/form-data
File NameKarenYinYeeNg.pdf
browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:37.0)
Gecko/20100101 Firefox/37.0
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso Lasso@lists.lassosoft.com
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Apr 15, 2015; 11:56
Steve Piercy - Website Builder
Re: uploading files and file type