Issues with mime type #50
Unanswered
RipleyCipher
asked this question in
Q&A
Replies: 1 comment 11 replies
-
|
Hey there! I think your approach is really close, but it looks like you're attaching the const fileToPin = new File([blob], "Imagen.txt", {type: "plain/text"});
console.log(fileToPin.type );
formData.append("file", blob);
formData.append("network", "public");Could you try |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm working in a proof of concept, trying to upload to Piñata an encrypted file. I'm using NestJS and I've tried to use both Piñata SDK and Piñata API, and follow the guides in documentation and Youtube.
I don't know if I'm doing something wrong, because after performing the upload, apparently Piñata API changes the mime type of the file that I've uploaded.
This is the code I'm using:
When I log the response, the mime type is incorrect:
Nevertheless, when I pin a txt file with the same content using Piñata web, the file uploads correctly and I can see in the inspector that it maintains the correct mime type.
Has anyone here have a similar problem? Am I doing anything wrong?
Beta Was this translation helpful? Give feedback.
All reactions