Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • $\begingroup$ I already have working code. The HTML snippet is what I am trying to mimic in URLExecute. $\endgroup$ Commented Oct 18, 2015 at 21:34
  • $\begingroup$ It should send a jpeg file via a POST to a REST service. I posted further code where sending a text file works. I've also tried sending a Import["test.jpg","JPEG"] but I get errors. $\endgroup$ Commented Oct 21, 2015 at 5:39
  • $\begingroup$ The mime type of JPEG files is image/jpeg, not file. Try changing that. $\endgroup$ Commented Oct 22, 2015 at 3:01
  • $\begingroup$ You end up with: The value {{jpgFile,image/jpeg}->Image[RawArray[Byte,<56,75,3>],Byte,<<1>>,<<12>>->True,MetaInformation->{Exif->{ImageWidth->4288,ImageLength->2848,BitsPerSample->{<<3>>},Make->NIKON CORPORATION,<<43>>,FocalLengthIn35mmFilm->34,SceneCaptureType->0,GainControl->1,<<5>>}}]} specified for the option MultipartElements is invalid. $\endgroup$ Commented Oct 22, 2015 at 5:54
  • $\begingroup$ Specifying text I instead of Jpeg image data does nothing either. $\endgroup$ Commented Oct 22, 2015 at 5:56