Skip to main content

Guides

Usually you can pass a Blob directly into the request but to help guarantee success we recommend passing it into a File object.
Pin Blob
To upload a file from an external URL you can stream the contents into an arrayBuffer, which then gets passed into a new Blob that can then be uploaded to Pinata.
Upload by URL
To upload a file in base64 simply turn the contents into a buffer that is passed into a Blob.
Upload base64
Folders can also be uploaded via the API by creating an array of files and mapping over them to add them to the form data. This is different then having a single file entry and having multiple files for that one entry, which does not work.