Amazon S3 Temporary URL for Image Works in IE and Firefox, but Not in Safari

I use Amazon S3 to host images. The S3 bucket is private, so I create a temporary URL (using Right AWS ) with a 5-minute expiration so that the image displays, the URL looks like this (note: the URL below does not work):

https://mybucket.s3.amazonaws.com:443/attachments%2F30%2Fsmall.png?Signature=J%2BXzQd95myCNv0Re8arMhuTFSvk%3D&Expires=1235511662&AWSAccessKeyId=1K3MW21E6T8LWBY94C01

This works fine, and I can paste the URL in Firefox and the image will be displayed. The same goes for IE. However, when I try to use it in Safari, the URL seems to be resolved, but the image does not display. Similarly, if I try to use the URL in the src attribute of the IMG tag on the web page, Safari will not display (excellent in all other browsers), for example

alt text http://lylo.co.uk/screenshot.png

Has anyone seen this behavior before and can you point out that if anything, I could be wrong?

+3
source share
3 answers

With a bit of digging in the S3 library that I am using, I found a problem here.

S3, Content-Type. : PDF Content-Type application/pdf, - PNG. , S3, Content-Type, application/pdf PDF, PNG.

, Firefox IE PNG- S3, Content-Type, Safari , , .

, S3, , Content-Type PNG, .

.

+5

- , Safari, ?

0

URL- AWS:

...attachments%2F30%2Fsmall.png...

:

...attachments/30/small.png...

Firefox URL- ( ?) ASCII ( Firefox %2F / ), Safari . AWS, , HTTP 404 Safari.

, URL- AWS. URL-, Firefox , URL-, Safari , .

0

Source: https://habr.com/ru/post/1703696/


All Articles