NodeJS Moralis + IPFS : File Public Upload Disabled

I try this, but don’t work:

await Moralis.start({ serverUrl, appId, masterKey })
//await Moralis.initialize(appId, ‘’, masterKey)

const imageData = fs.readFileSync(pathFile /, { encoding: ‘base64’ }/)
if (imageData == undefined) return null

const imageFile = new Moralis.File(‘file.jpg’, { base64: Buffer(imageData).toString(‘base64’) })
await imageFile.saveIPFS()

I have an error: File Public Upload Disabled
Any suggestion?

You can use a dummy username and password, authenticate with that username and password and then use upload to IPFS.

I’m on a backend with nodejs, and using a username + password is not recommended on our servers.

what would be the problem with creating a user on your Moralis Server that can authenticate with a password that only you know?

@cryptokid

MasterKey surpasses all authentication isnt it?

yes, but it may need to be explicitly used somehow for file upload.