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 protected]> 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 protected]/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 protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
> 
> This email sent to [email protected]
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to