cancel
Showing results for 
Search instead for 
Did you mean: 

SUP 2.1 how to upload a picture from native app to back-end through SUP?

Former Member
0 Kudos

Hi everyone,

We are currently making a Proof of Concept based on Sybase Unwired Platform 2.1.

The mobile application is a native iOS application & should be able to take a picture and upload it into the backend.

The backend already exists and has Rest/XML web services and a Rest service (Multipart/Post) for the picture upload.

However we are experiencing problems to integrate the picture upload service in SUP.

How can this service be integrated into the platform in our scenario ?

More generally what is the best practice in SUP when an upload of binary data (picture for instance) from the device to the server is required ?

Thank you

Accepted Solutions (0)

Answers (3)

Answers (3)

sujith_prathap
Advisor
Advisor
0 Kudos

Hi,

     You could try to convert the image to NSData and then do a POSTto the backend and that should suffice.

Best Regards,

Sujith

Former Member
0 Kudos

Hi,

We are currently trying to upload jpeg image file taken by the device camera. Our existing backend service is a accepting http POST request with multipart/form-data.

So we have 2 questions:

  • Can SUP integrate such services ?
  • If not, how such a use case (upload of a picture to a backend system) should be implemented in a SUP environment ?

Thanks

Former Member
0 Kudos

Hi,

You can very much upload the RAW data to the backend with SUP 2.1.2, if your webservice is accepting the NSData there should not be any problem, I hope you are writing the NSData in your POST body, you might have to check RequestHeader, probably tools like charles proxy  will help to intercept.

Regards,

Srinivas Divakarla

Ian_Thain
Developer Advocate
Developer Advocate
0 Kudos

Can you clarify further the data types you are using for the picture etc? Thanks