简体   繁体   English

将许多图片上传到解析

[英]Upload many images to Parse

I'm trying to upload images to my parse class so I can use them later in my iOS App. 我正在尝试将图像上传到我的解析类,以便以后可以在我的iOS应用中使用它们。 I have over 200 images so I can't go one by one choosing file. 我有200多张图片,因此无法一一选择文件。 Is there any efficient way to do it? 有什么有效的方法吗?

I've seen that I can import json and csv files. 我已经看到我可以导入json和csv文件。 But I don't have experience on how to create those files and set the location of my images. 但是我没有如何创建这些文件和设置图像位置的经验。

You can upload a file manually via Parse REST API. 您可以通过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): 为了以JSON格式上传数据,首先需要将图像存储在Web服务器中,因此您可以使用URL访问它们(JSON文件仅存储字符串,布尔值,数字...而不是像图片,它可能就像对包含该图片的服务器的引用一样工作,然后在您的iOS应用中,您需要从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. 在JSON中, {}代表对象, []代表数组。

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. 对于CSV文件,您需要在excel中创建一个表,然后将其导出为CSV,同时还要使用一列引用图片网址。 In resume you can upload them to another server OR to parse with the API. 在履历表中,您可以将它们上传到另一台服务器,或者使用API​​进行解析。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM