Created
September 27, 2012 21:32
-
-
Save mmhan/3796589 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The followings are the outputs of <?php debug($this->request->data); ?> | |
//For entries/customize | |
array( | |
'title' => 'title', | |
'Filename' => '2106.jpg', | |
'Upload' => 'Submit Query' | |
//Note the missing params "Filedata" which is the one containing the jpeg data. | |
//see below for the expected format. | |
) | |
//For entries/upload it was outputted as below which was the norm | |
//PHP handles uploading the binary data into a temp folder and gives the array below for user to play with. | |
array( | |
'Entry' => array( | |
'id' => '', | |
'entry' => array( | |
'name' => 'Photo on 28-7-12 at 9.29 PM.jpg', | |
'type' => 'image/jpeg', | |
'tmp_name' => '/Applications/XAMPP/xamppfiles/temp/phpS7LTMc', | |
'error' => (int) 0, | |
'size' => (int) 156553 | |
) | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following was taken from Firebug's Net panel's POST tab. | |
This is how flash posted the data for entries/customize | |
--kysqyjqwoxedwqdyyutnftnihuuproui | |
Content-Disposition: form-data; name="title" | |
title | |
--kysqyjqwoxedwqdyyutnftnihuuproui | |
Content-Disposition: form-data; name="Filename" | |
2106.jpg | |
--kysqyjqwoxedwqdyyutnftnihuuproui | |
Content-Disposition: form-data; name="Filedata"; filename="2106.jpg" | |
Content-Type: application/octet-stream | |
ÿØÿà�JFIF������ÿÛ��ÿÀ�,Â�ÿÄ¢���������� ���}�!1AQa"q2¡#B±ÁRÑð$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùú������� ��w�!1AQaq"2B¡±Á #3RðbrÑ | |
<<Other binary stuffs>> | |
--kysqyjqwoxedwqdyyutnftnihuuproui | |
Content-Disposition: form-data; name="Upload" | |
Submit Query | |
--kysqyjqwoxedwqdyyutnftnihuuproui-- | |
This is how html posted data for entries/upload | |
-----------------------------7093174748170610211334141029 | |
Content-Disposition: form-data; name="_method" | |
POST | |
-----------------------------7093174748170610211334141029 | |
Content-Disposition: form-data; name="data[Entry][id]" | |
-----------------------------7093174748170610211334141029 | |
Content-Disposition: form-data; name="data[Entry][entry]"; filename="Photo on 28-7-12 at 9.29 PM.jpg" | |
Content-Type: image/jpeg | |
ÿØÿà�JFIF������ÿí�XPhotoshop 3.0�8BIM�����Z�%G����Photo Booth�8BIM%�����qydB 8È_28ÖÎÅ!ÊÿâàICC_PROFILE���Ðappl��mntrRGB XYZ Ü | |
<<Other binary stuffs>> | |
-----------------------------7093174748170610211334141029-- | |
Looks eerily similar except for "Content-Type: image/jpeg" vs. "Content-Type: application/octet-stream". I tried changing the line 87 of UploadPostHelper.as to say "Content-Type: image/jpeg" but apparently it still didn't work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment