Forum Discussion

joeybear's avatar
joeybear
Contributor
15 years ago

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):

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?

9 Replies

  • ef130968's avatar
    ef130968
    Occasional Contributor
    I'm having the same issue and would also like to know if this is possible.
    I am using the 3.6 Pro beta1 release

    Eric.
  • Hi!

    This isn't currently possible, but we should fix it. Exactly how are you attaching the file to the request and setting up the form parameters? Can you show a screenshot?

    regards!

    /ole
    eviware.com
  • Hi!

    Update; I've fixed so the upcoming nightly build uses the content-Id value of the attachment as the name of the form (if it is specified).

    Hope that works for you!

    regards!

    /Ole
    eviware.com
  • ef130968's avatar
    ef130968
    Occasional Contributor
    Great. Thanks for the update.

    However, I noticed that the latest nightly build is dated 01 June 2010 14:33.
    When will the next one be...seems like they are a long way apart.

    Thanks,

    Eric.
  • ef130968's avatar
    ef130968
    Occasional Contributor
    It appears to be a standard version. We are using soapUI-Pro.
    If I open an existing project I'm missing a lot of functionality that is required for my projects to run.
    Is there a location for the Pro version nightly build download?

    Thanks,

    Eric.
  • ef130968's avatar
    ef130968
    Occasional Contributor
    Just finished testing the fix and it works perfectly.

    Thanks.