PDF.js Express access to AWS S3 object with pre-signed URL

Hi there,

we are using pdf.js express.

when accessing to a document by passing an AWS pre-signed URL, there would be an error when called “loadDocument” method, we found that the loadDocument method would call the URL twice with one “HEAD” method and one “GET” method.

because the AWS pre-signed URL must tie to one HTTP verb at one time, there is no way to enable 2 verbs in one pre-singed URL, and we don’t find any method in PDF.js express to pass 2 URLs, like one for “HEAD” method, and the other for “GET” method

is there are way that we can avoid such error message?

Any help would be appreciated.

thank you.

Hey there!

You can safely ignore the HEAD warning message. In the next release we will have a fix for this as well.

Thanks,
Logan

1 Like