How to upload a folder of images, by giving only path using npm's pinata sdk ? I only want to give folder's path. using javascript.

2 Answers 2


Ok, After a lot of R&D,found out that you cannot, upload folder of images using the pinata sdk(npm pack.). But you can use Moralis and IPFS public gateway.


You can use:

const IMAGES_LOCATION = "path/to/folder";
const imageFolderUploadResponse = await pinata.pinFromFS(IMAGES_LOCATION);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.