react-native-doc-viewer
react-native-doc-viewer copied to clipboard
Support of AWS presigned url format
Hi there,
I found if there is a %
inside a url then the %
sign will be changed to %25
everywhere in it.
For example:
URL:
https://xxx.s3.amazonaws.com/acda72b76cb62dbd13c65a8f/ZzDE3KaPiodb4asy2?AWSAccessKeyId=AKIAJK3DYEJEVJ766FMA&Expires=1524730260&Signature=EnVTV05ZHhJZX8TeDVmj05SoPPM%3D
gets changed to
https://xxx.s3.amazonaws.com/acda72b76cb62dbd13c65a8f/ZzDE3KaPiodb4asy2?AWSAccessKeyId=AKIAJK3DYEJEVJ766FMA&Expires=1524730260&Signature=EnVTV05ZHhJZX8TeDVmj05SoPPM%253D
which breaks the signature of the AWS presigned url.
Any plans to support this url format?
Thanks,
Any update on that ? in my case it changes Aws AccessKeyId
Try 'https://xxx.s3.amazonaws.com/acda72b76cb62dbd13c65a8f/ZzDE3KaPiodb4asy2?AWSAccessKeyId=AKIAJK3DYEJEVJ766FMA&Expires=1524730260&Signature=EnVTV05ZHhJZX8TeDVmj05SoPPM='
instead: 'https://xxx.s3.amazonaws.com/acda72b76cb62dbd13c65a8f/ZzDE3KaPiodb4asy2?AWSAccessKeyId=AKIAJK3DYEJEVJ766FMA&Expires=1524730260&Signature=EnVTV05ZHhJZX8TeDVmj05SoPPM%3D'
%3D in UTF code is = sign
Url you sent as strings should be decoded
const urlYou'llSentToOpenFileAsUrlParam = decodeURI(yourUrl);