简体   繁体   中英

Upload to bucket pictures from a csv file with GAE and Google Cloud Storage

First of all, I'm using the standard environment in java.

Here's my problem: I have a directory filled with pictures and I have also a CSV file in which there is some informations in columns AND a column which refers to the name of the associated picture in the directory.

I don't know how I would be able to read the csv file and then upload the corresponding picture situated in the directory.

I had the idea of uploading the csv file in one input file and all the pictures in another input file which be "multiple", but the amount of pictures is really large (approximately 5000).

Any idea to solve this ?

Thanks for your help

You can use Java Standard Environment with Cloud Storage Client Libraries following those steps:

  1. Setup Cloud Storage.
  2. Upload csv file to the bucket using gsutil cp (can also be used to upload the entire folder).
  3. Read file from the bucket to get file names.
  4. Upload files to the bucket, as shown in this example .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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