my question is as tittle.I have a datasnap rest server,I want upload file with java or java script.How do? (best have sample code)
thank your very much!
my question is as tittle.I have a datasnap rest server,I want upload file with
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve once tried to pass a stream to a REST call, but eventually
resorted to uploading with a direct WebBroker request to a page…
which is easier to manage. That’s not trivial either, as you’ll have to manage the multi-part request data that you receive when you use a form to let the user pick the file to upload.
This is some of the code I’m using in WebModuleBeforeDispatch:
type TMyIdHTTPAppRequest = class (TIdHTTPAppRequest);
However it is based on a custom TMultipartRequestFiles that I have, trying to clean it up and load it as part of my Relax open source extension to Delphi datasnap.
Any other solution to manage file uploads? I guess there should be something ready to use in Indy, I wrote that class many years ago.