How to let discourse load images from local after you've downloaded them back to server


#1

Continuing the discussion from Amazon S3 Bucket:
i’ve ran this command

./launcher enter app
rails c
rake uploads:migrate_from_s3

but i cant get images to load from local, i’ve even rebaked post and did a rebuild


(Bhanu Sharma) #2

I’m stuck with the same issue!


(Vinoth Kannan) #3

Can I have any example post raw text which having amazon s3 upload?


#4

do you mean a topic link?
or direct url from an aws s3 upload


(Vinoth Kannan) #5

I need post raw (not html) to check the markdown text of s3 uploads.


#6

do you mean this

(upload://ny1HN5T9evwFbdmKtkCRwyCw5Bz.jpeg)

Rebake did not actually revert the URLs back to local
(Vinoth Kannan) #7

I can confirm the rake task is currently not effective since it expects S3 upload URLs in the %.s3%.amazonaws.com/% format. So the rake task code needs to be modified. Else you may need to copy the uploads manually.


Software won't display uploaded avatar?
#8

the uploads are on server, rake task worked but, pics that were uploaded to s3, still loads from s3, i need to get them to load from server, i had removed s3 from settings and images upload directly to local but i need to get old s3 images to load from server instead


(Vinoth Kannan) #9

Ah, so the above upload url is newly generated one after you run that rake task. Sorry for the confusion.


#11

no, its the one from s3

this is discourse’s url
![24769C61-6DAE-47CB-880C-93211E686FAF|281x499](upload://1X2EnjEbuQJ8DbdAw5XeIuXMolC.jpeg)
this is s3’s
(upload://ny1HN5T9evwFbdmKtkCRwyCw5Bz.jpeg)


Software won't display uploaded avatar?
#14

ant eta on fix? i dont want to kill s3 instance as yet, but if i keep it up long it’ll cost more money