0

here's the thing: I download a bunch of data in JSON format. I put that into an array of dictionaries. Then, I save to disk. One dictionary stores a link to some image. What I would like to do is to store also the actual image (not the link!) along with rest of the data. How would you start? Which way to go?

Alex Tau
  • 2,639
  • 4
  • 25
  • 30

2 Answers2

1

I would download the image and save the local path alongside the URL path.

However, if you're going for one big file, you could always base64-encode it.

I think using the filesystem directly and saving your local path would be more efficient and effective than one monolithic file, as you'll save a lot of parsing and encode/decode time.

Community
  • 1
  • 1
Ben Mosher
  • 12,831
  • 6
  • 66
  • 78
0

I suggest you to start from this tutorial : SimpleFTPExample

Nekto
  • 17,789
  • 1
  • 52
  • 65