-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot open PDF sent as multipart/form-data #307
Comments
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 👍 |
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: 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 Great news - I’ve identified the reason why the downloaded file appeared broken. The issue was on the JS side, and in the v2 (which I’m actively working on), this will be resolved). I expect to complete this in a few weeks, and I hope you’ll enjoy the new UI and new features ;) |
Could you test the early v2 build to ensure everything works as expected now? The Docker image and precompiled binary files are available at this link: https://github.com/tarampampam/webhook-tester/releases/tag/v2.0.0-alpha1 |
Running Alpha 4 and I posted a PNG using Postman. The download button writes all of the text you see to a file, which results in an invalid PNG. Removing first three lines and the last line fixes the file. Ideally the filename value should be used when saving the file, as well as the boundary and content lines being removed. It gets a little more complicated when multiple files and key/value pairs are posted as form-data. Each file would need to be saved separately, and text just ignored: |
This is fine because the request body depends on what data you are sending and how you are sending it. For multipart requests, the server receiving the data determines how to interpret it. If you are only capturing the data being sent, you will need to handle it yourself. While this might seem a bit unusual, it can be very useful for debugging how the server constructs the multipart request |
Check out the new release v2.0.0 (or a later version). If you encounter any errors or unexpected behavior, feel free to open a new issue. I'll be closing this one :) |
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:
And this at the end:
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
The text was updated successfully, but these errors were encountered: