Reputation: 362
I'm trying to upload images to my parse class so I can use them later in my iOS App. I have over 200 images so I can't go one by one choosing file. Is there any efficient way to do it?
I've seen that I can import json and csv files. But I don't have experience on how to create those files and set the location of my images.
Upvotes: 0
Views: 120
Reputation: 2668
You can upload a file manually via Parse REST API. Take a look at this docs here.
In order to upload your data in JSON format maybe, first the images would need to be stored in a web server, so you can access them with a URL (a JSON file only stores strings, bools, numbers... not data like an image, it might work like a reference to the server containing the image, then in your iOS app you would need to download the image from URL):
{ "results": [
{
"createdAt": "2015-07-07T15:57:07.299Z",
"name": "Actividades Mayo",
"objectId": "N8RI64iJO8",
"bool": false,
"updatedAt": "2015-08-13T17:25:03.838Z",
here goes the image url-> "image": "https://sample.com/images/animage.jpg"
}
]}
In JSON {}
represents an object and []
represents an array.
And for a CSV file you would need to make a table in excel and then export it in CSV, also with a column refering to the images url. In resume you can upload them to another server OR to parse with the API.
Upvotes: 0