Forum Discussion

N_P's avatar
N_P
Occasional Contributor
3 years ago

SignatureDoesnotMatch error when uploading file to google bucket

Hi Team,   I am trying to upload pdf file to google bucket but getting error as below   Endpoint: https://storage.googleapis.com/pnsm-evq/Documents/{ID}/2022-11-17T14%3A14%3A20Z_README.pdf?X-Goog...
  • richie's avatar
    3 years ago

    Hey N_P 

     

     

    Looking at the error response and the endpoint you provide I'd suggest you're not providing the correct headers (the "Endpoint" URL you supply launches 

     

    I have a look at the screenshot you embedded and it appears that you have lots of x-goog-% query parms. 

    Should these query parms actually be header parms on the request rather than query parms?

     

    I did try taking a look to find the headers needed on a google bucket upload, but I couldn't find anything that wasnt contradictory (I suspect the headers have changed over time perhaps).

     

    Anyway - if you DO know the correct URI pattern (including query parms) along with the correct header parms, I'd suggest you just need to update the relevant query parms to 'header' in your screenshot.

     

    Worst case - if you are unsure on the headers/query parm combination, you could manually upload a file via your browser (ensuring to proxy the request via Fiddler, which is an HTTP/HTTPS traffic sniffer) - Fiddler will then show you the correct headers/query parms needed to upload a file and then you can do it from within ReadyAPI by emulating the same query/header parms on the request.

     

    Sorry I can't be of more help - but without knowing the correct URI pattern and required headers - this is my best guess!

     

    Cheers,

     

    Rich