Hi!

I'm using the RESTeasy package with JBOSS AS 6.0.0 final.

I'm trying to send a multipart form to a server with one part containing
json and the other part containing the file using the RESTeasy client.

The problem is that the receiving server wants Content-Disposition:
form-data; filename="somefilename.jpg" in the file part of the multipart
post. Now the client sends Content-Disposition: form-data; name="picture"

I have the multipart form constructed in the client as a POJO with the
needed annotations. The POJO used looks like this:

public class PictureExample {
@FormParam("json")
@PartType(MediaType.APPLICATION_JSON)
private JsonData json;

@FormParam("picture")
@PartType(MediaType.APPLICATION_OCTET_STREAM)
private File data;

    public File getData() {
        return data;
    }

    public void setData(File data) {
        this.data = data;
    }

    public PictureExample() {
}

public JsonData getJson() {
return json;
}

public void setJson(JsonData json) {
this.json = json;
}
}

Is there any way to get the filename parameter into the Content-Disposition
part?

-Niklas
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to