Hello everyone.
I tried to upload a file ( image ) to IPFS using moralis- saveIPFS() function. but get errors
///
and this is my code
///
Hello everyone.
I tried to upload a file ( image ) to IPFS using moralis- saveIPFS() function. but get errors
///
and this is my code
///
if you look in network tab for an error message for that 400 error, what does it say?
it says : {“error”:“unauthorized”}
so I changed my code to this :
//
but still get same error
Is there a way that upload image to IPFS without authorize?
usually, you have to authenticate in front end before being able to upload to IPFS.
I would have expected an error that says that upload by public is disabled
you can not use master key in from end
thanks for your reply.
I have checked your messages in another post.
You said we can use dummy user to authenticate.
How can I use dummy user in my code?
in this case it looks like front end, you can authenticate easily with metamask in front end. ( you can use Moralis.authenticate()
)
for a dummy user, you can create a dummy user with a simple username and password, authenticate with that user and then upload the files