Forum Discussion

CXin's avatar
CXin
Frequent Contributor
15 years ago

REST service: attachment is not uploaded

Hi Support team,

In attachment part, I uploaded an attachment, the Type is shown as UNKNOWN. Why? (I uploaded a jpg file.)

And, check this post, http://www.soapui.org/SOAP-and-WSDL/add ... ments.html
There is a lot of options in the left navigation named: Request Properties, such as Enable MTOM, Enable Inline files...
but I don't see any of them.
Here is a screenshot of what I have

7 Replies

  • Hello,

    I'm guessing that your service is a REST service? The documentation page you're referring to describes attachment handling for SOAP, which has a lot of different options for how the file is sent (the MTOM stuff etc.) which determines the Type, which is otherwise set to UNKNOWN. For REST, which is pretty much a basic HTTP request, attachments will be attached as fields in the form content when using the multipart/form-data content type. This behaviour will be the same as when using a HTML form which allows file uploading.

    Regards,
    Dain
    eviware.com
  • CXin's avatar
    CXin
    Frequent Contributor
    Yes, you are right. My service is REST.
    As my other post described, the attached file is not accepted by server...
    using CURL command, it is working well.
    But in SoapUI, it doesn't work...
  • CXin's avatar
    CXin
    Frequent Contributor
    By the way, this is really important and urgent to my work.
    And that's why I choose to buy soapui license.

    Any help is appreciated.
  • Hi!

    Exactly how do you want to send the attachment with your request? As the body of the request? Or part of a multipart message? How have you configured the request currently? (maybe you can attach a screenshot!?)

    regards!

    /Ole
    eviware.com
    • Aradhana's avatar
      Aradhana
      New Member

      Hello,

       

      Can you please let me know how this is solved?

      I am also in the similar situation.

      Actually, I need to upload an attachment using a Rest request.

      I'm also using some other parameters along with the file.

       

      Any help is appreciated!!

    • Shirley_yuan's avatar
      Shirley_yuan
      Occasional Contributor

      CXin

       

      Hi, can you explained how the problem is solved.I also encountered the problem.

       

      Thanks!