illmill 87 Posted December 4, 2013 Report Share Posted December 4, 2013 I'm trying to upload a profile image to Linkedin and I'm not really sure how to go about it. I haven't used the $http upload feature in aymen's http plugin before. Aymen mentioned to me that in order to use the plugin for this sort of thing I need to use $http upload. I'm just not sure where I need to plug in the data. These are the available fields on $http upload: URLParamatersFile to UploadFile param nameContent TypeUser AgentReferrerProxyTimeoutI know what to put for URL, User Agent, Referrer, Proxy and Timeout, but I'm not sure about what goes where for the other fields. When I check out the http headers with fiddler, this is what I get: POST http://www.linkedin.com/mupld/upload other header/cookie stuff here.... ------WebKitFormBoundarykgB2NBmLM2jDlkSd Content-Disposition: form-data; name="upload_info" nYO2zho4RvzydGeSiikjYIMSFOSOq5cWBIktvdw-NqBCaCcRZQlR8018V-sjaADkZouh7Ew2NCOoEloaqbeK2gWOK1OoBSmRPVl920R82-AV3BGftjtRKyKjGLrGQLDZq29tVQejFmGIJqcWZGYMe_O4GLcj1mjhZGTQTKiO-wOCaemtmyfQ0FMSIUHvf1yftjKRTEP8NBVGklDZq29tVQeSjro0JZ2WZEAk72PSieOCM-6ZqbaR88ZGFrCxrBjtnIdRNTMxKx-VOUn ------WebKitFormBoundarykgB2NBmLM2jDlkSd Content-Disposition: form-data; name="file"; filename="ubot.JPG" Content-Type: image/jpeg And then there's a lot of random characters because of the image I'm uploading and then there's this: ------WebKitFormBoundarykgB2NBmLM2jDlkSd Content-Disposition: form-data; name="callback" uploadCallback1386168306980 ------WebKitFormBoundarykgB2NBmLM2jDlkSd Content-Disposition: form-data; name="upload_info_with_js" nYO2zho4RvzydGeSiikjYIMSFOSOq5cWBIktvdw-NqBCaCcRZQlR8018V-sjaADkZouh7Ew2NCOoEloaqbeK2gWOK1OoBSmRPVl920R82-AV3BGftjtRKyKjGLrGQLDZq29tVQejFmGIJqcWZGYMe_O4GLcj1mjhZGTQTKiO-wOCaemtmyfQ0FMSIUHvf1yftjKRTEP8NBVGklDZq29tVQeSjro0JZ2WZEAk72PSieOCM-6ZqbaR88ZGFrCxrBjtnIdRNTMxKx-VOUn ------WebKitFormBoundarykgB2NBmLM2jDlkSd-- 1 Quote Link to post Share on other sites
Aymen 385 Posted December 4, 2013 Report Share Posted December 4, 2013 ok considering the headers data you gave here this is what you should put in each field : Parameters :upload_info=value&callback=value&upload_info_with_js=value File To Upload:C:\Path\ubot.JPG File param name : file Content Type:image/jpeg (or image/png if your image extention is png) Quote Link to post Share on other sites
illmill 87 Posted December 4, 2013 Author Report Share Posted December 4, 2013 Thanks aymen! I get "Error uploading file. Operation timed out." upload_info=value&callback=value&upload_info_with_js=value Do you actually type it just like this, or do you replace 'value' with some value for each parameter? Quote Link to post Share on other sites
Steve 30 Posted December 4, 2013 Report Share Posted December 4, 2013 I'm pretty sure those parameter values need to be replaced with a value... but, I'm not exactly sure what you would replace them with.... Quote Link to post Share on other sites
Aymen 385 Posted December 5, 2013 Report Share Posted December 5, 2013 Thanks aymen! I get "Error uploading file. Operation timed out." Do you actually type it just like this, or do you replace 'value' with some value for each parameter?you need to scrape those values from the referrer page Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.