Thanks for attention,
I have paperclip config as below,
url: "/system/#{scoping}:class/:attachment/:id_partition/:hash_key/:style-:fingerprint/:basename.:extension"
When I upload an image on s3 it creates 4 images with different styles: thumb, original, max, and page
When I retrieve image by pic.image.url it gives
system/staging/pics/images/004/029/680/ba8c01bbc1ce88a002d81778dde225682c047bd1_key/original-5cd21536004adf8b7bbd19b7dd87238d/Homepage.jpg"
This path is correct.
When I retrieve thumb image by pic.image.url(:thumb) it gives this url, which is wrong.
system/staging/pics/images/004/029/680/c6c22691b51cbff3c8e8647da46de1a7303f9cb4_key/thumb-5cd21536004adf8b7bbd19b7dd87238d/Homepage.jpg"
while original thumb s3 url is
/system/staging/pics/images/004/029/680/d3653379f2a37b18851e72b06789f4245b2fda34_key/thumb-26462d27921069000a17cbb61a664d6b/Homepage.jpg
same issue happening with other styles. The key which is present in wrong thumb url, does not exist on s3.
the whole path until :id_partition, is correct but then from hash key the rest of url coming wrong
Aucun commentaire:
Enregistrer un commentaire