J JDS Active Member Licensed User Longtime User Oct 30, 2012 #1 We need to transfer a image to an webservice. Code: Copy Soap.PostString(Main.ASPUrl&"Status.asp", "pd="& Main.uniqueID & "&pw=" & Main.wachtwoord & "&px=" &sParameter) sParameter is an XML-file encrypted with base64. The above code works... without the image. The XML-file should also include the image. If we encrypt an image (240x139 px) and add this to the XML-file (sParameter) the asp-url becomes more than 2000 chars which isn't supported by the browsers. Any thoughts how to transfer the XML-file? Or how to shrink the size of the url?
We need to transfer a image to an webservice. Code: Copy Soap.PostString(Main.ASPUrl&"Status.asp", "pd="& Main.uniqueID & "&pw=" & Main.wachtwoord & "&px=" &sParameter) sParameter is an XML-file encrypted with base64. The above code works... without the image. The XML-file should also include the image. If we encrypt an image (240x139 px) and add this to the XML-file (sParameter) the asp-url becomes more than 2000 chars which isn't supported by the browsers. Any thoughts how to transfer the XML-file? Or how to shrink the size of the url?
J JDS Active Member Licensed User Longtime User Oct 30, 2012 #2 What should the server-side look like if we use a postfile? We first send the large XML-file, which get saved on disk and then we send the initiator which opens and processes the file. Does the postfile send the file as a byte array? Any help would be great... Upvote 0
What should the server-side look like if we use a postfile? We first send the large XML-file, which get saved on disk and then we send the initiator which opens and processes the file. Does the postfile send the file as a byte array? Any help would be great...
A abner69 Member Licensed User Longtime User Oct 30, 2012 #3 why not encrypt the name of the file to send into your xml file, and then upload the file seperately using httputils2? The server side can then take care of the "housekeeping" needed... ...Pablo Upvote 0
why not encrypt the name of the file to send into your xml file, and then upload the file seperately using httputils2? The server side can then take care of the "housekeeping" needed... ...Pablo
J JDS Active Member Licensed User Longtime User Oct 31, 2012 #4 Hi Pablo, That was exaclty what I suggested in my second post. But we have no idea what the serverside lookslike for a postfile. ASP is a url with parameters. If we read the image as a byte array and then make it base64 the url gets to long because of the long base64 string (2000+ chars). Our PHP-knowledge is limited but what i've read this also works with a url. Which gives the same problem. What other options do we have? Upvote 0
Hi Pablo, That was exaclty what I suggested in my second post. But we have no idea what the serverside lookslike for a postfile. ASP is a url with parameters. If we read the image as a byte array and then make it base64 the url gets to long because of the long base64 string (2000+ chars). Our PHP-knowledge is limited but what i've read this also works with a url. Which gives the same problem. What other options do we have?
Erel B4X founder Staff member Licensed User Longtime User Oct 31, 2012 #5 Google for 'php://input'. The files is sent as the POST payload. Upvote 0