-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
I was using the library for some simple testing, and got a very obscure issue with binary files not uploading correctly. It looks like they are sent wrongly encoded on the request side.
A simple test case in Node.js:
const fs = require("fs");
const express = require("express");
const app = express();
app.use("/", (req, res) => {
const writeStream = fs.createWriteStream(req.query.filename || "output.txt");
req.pipe(writeStream);
res.send();
});
app.listen(2342);This creates a HTTP app on port 2342 that writes the body of any request to the filename given as a query parameter, e.g. http://localhost:2342/?filename=uploaded.zip means saving the file to uploaded.zip in the app dir.
If I upload a .zip file like the attached test.zip as a "binary" file via Postcode (latest version, installed today), and try to open the resulting uploaded.zip, it will be invalid.
The same flow works as intended in Postman.
Attachments:
Metadata
Metadata
Assignees
Labels
No labels