• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ERRest Photo Attachment Uploads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERRest Photo Attachment Uploads


  • Subject: Re: ERRest Photo Attachment Uploads
  • From: Jesse Tayler <email@hidden>
  • Date: Fri, 20 Apr 2012 14:08:58 -0400

So, whats your trouble?

If you are using iOS then use .bplist and upload using nsdata from a binary dictionary

I would think you would upload the image file after you save and get a return I'd for your main object, but I don't know your model so I don't know...



Sent from my iPad

On Apr 20, 2012, at 1:05 PM, Kevin Hinkson <email@hidden> wrote:

Hi all,

I have a question about handling photo attachment uploads using ERRest.

I have a Photo object in iOS that I am posting to ERRest using the XML format

XML Example

<?xml version="1.0" encoding="UTF-8"?>
<Photo>
<created type="datetime">2012-04-20T16:42:09Z</created>
<data><![CDATA[--- base 64 encoded string for the photo ---]]></data>
<latitude type="double">0.0</latitude>
<longitude type="double">0.0</longitude>
<modified type="datetime">2012-04-20T16:42:09Z</modified>
<taken type="datetime">2012-04-20T16:41:09Z</taken>
</Photo>

On the server side this object looks the same except I use ERAttachment to store the image data. What I am wondering is 
1. Am I sending the photo data correctly?
2. How can I access the data value and create/update an ERAttachment as required

So far I can tell ERRest to ignore the unknown data attribute. The only other similar question I have seen is here: http://www.mail-archive.com/email@hidden/msg42858.html but I think he is posting the data a little bit differently and I wasn't able to figure out how to post the data correctly and intercept the data value.

Any help would be appreciated.


— K.R.H.

Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >ERRest Photo Attachment Uploads (From: Kevin Hinkson <email@hidden>)

  • Prev by Date: Re: Maven
  • Next by Date: Re: Maven
  • Previous by thread: ERRest Photo Attachment Uploads
  • Next by thread: Jar frameworks and resource loading
  • Index(es):
    • Date
    • Thread