Reputation: 13
I try to upload image using KINVEY REST api (http://devcenter.kinvey.com/rest/guides/files#Uploading)
but i failed to upload file in file storage.
please tell me how to send image file-name/file-data in get/put request and which header should i use.
also refer any link which help me.
thanks in advance.
Upvotes: 1
Views: 770
Reputation: 660
I'm an engineer at Kinvey. To use the REST API, you need to first get an API URL to upload by making a GET request to:
/blob/:appKey/upload-loc/:fileName
That will return a response with the following object:
{ "URI" : <externalLocation> }
Exctract response.body.URI, and perform a PUT request to that URI. Set the content-length header, and pass your binary file as the request.body.
A couple of notes about file upload:
Upvotes: 1