M
manheim
I have a page posting a raw jpg to me via HTTP POST. All reference
I've found is centered around retrieving POST data as name/value pairs
which will not work in this situation.
What I need to do is retrieve the raw POST data and save it as a
jpg.
Here is some php code that does the same thing for reference:
$jfh = fopen($jpeg_file, 'w') or die("can't open file");
fwrite($jfh, $GLOBALS['HTTP_RAW_POST_DATA']);
fclose($jfh);
I assume there is some way to access POST data as a stream and then
write that stream to a file, but it's not clear to me how. Perhaps I
need to use Request.Form.GetObjectData, but I'm not sure how to setup
SerializationInfo and StreamingContext appropriately.
Any thoughts or suggestions would be much appreciated.
Thanks in advance!
Dan
I've found is centered around retrieving POST data as name/value pairs
which will not work in this situation.
What I need to do is retrieve the raw POST data and save it as a
jpg.
Here is some php code that does the same thing for reference:
$jfh = fopen($jpeg_file, 'w') or die("can't open file");
fwrite($jfh, $GLOBALS['HTTP_RAW_POST_DATA']);
fclose($jfh);
I assume there is some way to access POST data as a stream and then
write that stream to a file, but it's not clear to me how. Perhaps I
need to use Request.Form.GetObjectData, but I'm not sure how to setup
SerializationInfo and StreamingContext appropriately.
Any thoughts or suggestions would be much appreciated.
Thanks in advance!
Dan