Kenneth Poindexter · Feb 2, 2016

How do we upload a document from a CSP Page

I have a CSP page that needs to allow the user to submit a file.  I have a form with an element in it <input type="file" name="file"/> which allows the user to select the file they want to upload from their local filesystem.  

How do I go about actually getting the file to be sent to the server?

0 1,243
Discussion (5)2
Log in or sign up to continue


Check out /csp/samples/upload.csp

Does this cover what you need?

Im dealing with the same thing currently.  Any chance I could get a look at the upload.csp file you are referring too?

Thanks Ben-  This does help.  What I was missing was....

1.  On the <form> element you need the multi-part encoding specified,

and then when you process the form on the server you need to look into the %request.MimeData to actually find the file stream.