joeybear
15 years agoContributor
Attachments needing different 'form' name vs. file name - is
I have a test that uses an attachment "1.jpg". I haven't seen any way to set the form name to something other than the file name (when one sets the name for the attachment).
Below is the header of the request (which shows the form name to be the same as the file name):
Is there *ANY* way to set the form name without changing the filename?
Below is the header of the request (which shows the form name to be the same as the file name):
POST http://mydevbox/userprofile/update/pic/api?ft=json HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: multipart/form-data; boundary="----=_Part_0_1434250948.1280853903766"
MIME-Version: 1.0
Cookie: sessionid=c407ca3b316ab3cc94502092a68fc3ac; expires=Tue, 17-Aug-2010 16:45:03 GMT; Max-Age=1209600; Path=/
User-Agent: Jakarta Commons-HttpClient/3.1
Host: mydevbox
Content-Length: 81731
------=_Part_0_1434250948.1280853903766
Content-Type: image/jpeg; name=1.jpg
Content-Transfer-Encoding: binary
Content-Disposition: form-data; name="1.jpg"; filename="1.jpg
Is there *ANY* way to set the form name without changing the filename?