webhook-tester icon indicating copy to clipboard operation
webhook-tester copied to clipboard

Cannot open PDF sent as multipart/form-data

Open hirenshah opened this issue 1 year ago • 5 comments

I'm sending a PDF file as multipart/form-data and when I click download, for some reason it saves it as a .bin. The contents look like a PDF but also happen to have the following at the start:

--b4baaa6a-3ea0-4490-9026-e81849d841d2
Content-Type: application/pdf
Content-Disposition: form-data; name="document"; filename="01234567891011_Confirmation_Signed.pdf"; filename*=utf-8''01234567891011_Confirmation_Signed.pdf

And this at the end:

--b4baaa6a-3ea0-4490-9026-e81849d841d2--

Even after removing those parts, the PDF cannot be opened. File attached as a .txt because it wouldn't let me upload a .bin.

Am I missing something here?

3a8e6dfa-2c93-4f67-af74-dc485f091998.txt

hirenshah avatar May 23 '23 11:05 hirenshah

Not sure if it helps, but this is what happens when the same request is sent to webhook.site:

image

hirenshah avatar May 27 '23 21:05 hirenshah

I'm going to rewrite the UI completely, can you wait for that?

tarampampam avatar May 29 '23 06:05 tarampampam

I'm going to rewrite the UI completely, can you wait for that?

Of course 🙂

I'm not paying for this so it would just be rude if I did anything other than wait.

Do you have a rough time line in mind? Give me a shout if you need help with testing 👍

hirenshah avatar May 29 '23 06:05 hirenshah

Not yet, most part of my time is spent at my regular job..

tarampampam avatar May 29 '23 06:05 tarampampam

Not yet, most part of my time is spent at my regular job..

That is fine. This one isn't a big issue for me because the PDF is only being sent here for testing purposes.

The other two issues I raised were more significant: https://github.com/tarampampam/webhook-tester/issues/306 https://github.com/tarampampam/webhook-tester/issues/308

I added comments to #308 as I spotted an issue with #306 and more with #308. If those could be fixed please, it would be much appreciated.

Also, can you drop me an email (my email address is visible in my profile) with details of how I can donate some £ for all your hard work 🙂

hirenshah avatar May 29 '23 11:05 hirenshah