PinataCloud / Pinata-SDK

Official SDK for the Pinata IPFS service
MIT License
273 stars 67 forks source link

[ERROR] - Malformed content type #147

Closed hironate closed 5 months ago

hironate commented 1 year ago

Suddenly Pinata SDK started giving weird error. Malformed content type, anybody knows what's the reason ? here is snippet.

    const stream = downloadS3Stream({
      Key: fileUrl
    });

    const result = await pinataClient.pinFileToIPFS(stream);

    return result;
hironate commented 1 year ago

Seems like the current release is not supporting without options, updated to release v2.0.0, passed options and worked.

aswatyn commented 1 year ago

Yes name is mandatory now

const options = {
                    pinataMetadata: {
                        name: yourfilename,
                    },
                };

Need to pass name in this format

hironate commented 1 year ago

Tried passing with current released version, it did not work.

aswatyn commented 1 year ago

you can update the package to latest version and try

hironate commented 1 year ago

@aswatyn @rommel-pinata yeah, already did work around. how can i contribute to improve doc ?