Sending byte array(data) to a URL with POST or GET
-
Hello. Im having a picture on my computer etc named "Hello.jpg", and I want to send it to a homepage etc http://mysite.com/image.php which then saves it to a blob columm in a database. I tried to do a simple GET with the byte array that contains the picture, but of course it doesn't save the whole image just with http://mysite.com/image.php?image=bytearray How can I solve this problem? Thx
-
Hello. Im having a picture on my computer etc named "Hello.jpg", and I want to send it to a homepage etc http://mysite.com/image.php which then saves it to a blob columm in a database. I tried to do a simple GET with the byte array that contains the picture, but of course it doesn't save the whole image just with http://mysite.com/image.php?image=bytearray How can I solve this problem? Thx
-
Not enough information. If GET-ing like that the data should obviously be URL-encoded, but what does the PHP script expect? Perhaps a POST instead of a GET? Maybe with base64 encoded data? We don't know - do you.
Haven't really created the PHP script yet. I'm not having any specific idea how to do it. I'm looking for an idea and some help how to fix it. But yes, a post to the site will be as useful as a GET. I'm looking and searching for ideas. Google didn't help me very much this time :)
-
Haven't really created the PHP script yet. I'm not having any specific idea how to do it. I'm looking for an idea and some help how to fix it. But yes, a post to the site will be as useful as a GET. I'm looking and searching for ideas. Google didn't help me very much this time :)
-
Hello. Im having a picture on my computer etc named "Hello.jpg", and I want to send it to a homepage etc http://mysite.com/image.php which then saves it to a blob columm in a database. I tried to do a simple GET with the byte array that contains the picture, but of course it doesn't save the whole image just with http://mysite.com/image.php?image=bytearray How can I solve this problem? Thx
-
Yeah, that kind of upload I have :) The question is more like, how can I write a C# application that postes a file to that php script?
-
Yeah, that kind of upload I have :) The question is more like, how can I write a C# application that postes a file to that php script?
One more Google action (httprequest file upload) results in a lot, including a CP article which looks great: UploadFileEx: C#'s WebClient.UploadFile with more functionality[^] Stop being lazy, start searching yourself. :)