Uploading bigger files to Pinata using pinata sdk - nodejs

261 Views Asked by At

I'm trying to upload bigger video files to pinata of around 1-2GB. I'm using pinata SDK and using the pinFileToIPFS function to pin file. However, it is taking forever and ends up crashing the node server. I looked at the Pinata docs, but couldn't a way to handle large files or upload them by chunk to Pinata. Any kind of thoughts on this will be helpful. Thanks in advance

1

There are 1 best solutions below

0
On

Super late answer here, but you could try this CLI. It tends to work better. But there is a better upload API coming down the pike soon too.

https://www.npmjs.com/package/pinata-upload-cli

If you can't use the command line for your project, check out the source code for the CLI. It uses a different request library (got) that seems more reliable that what the SDK uses.