Where to store images and how to migrate them?


(Pawan Rawal) #1

So we have a discourse instance running at https://discuss.dgraph.io.

Somedays back we moved it from DO to AWS. In the process of doing so, our older assets stopped working as we started using S3 for them. I have a couple of questions here.

  1. Should we store images on S3 or on the instance itself? I didn’t find a clear answer for this from any topic.
  2. I tried to copy some images(which were uploaded before migrating to S3) from the instance to the relevant S3 bucket but it doesn’t work. Somehow the URL for fetching them is still the old one?

I want to find out a way which works for both the images which were uploaded earlier and the new images.

Thanks


(Pawan Rawal) #3

Any ideas @zogstrip?


(Régis Hanol) #4

If your Discourse instance is running on AWS, it would be best to use S3 to store images/attachments.
You can use the uploads:migrate_to_s3 rake task to do the migration :wink: