The limit is of 1GB when uploading to IPFS.
I could try to test with a file of 400MB
You also have latest Moralis server version?
The limit is of 1GB when uploading to IPFS.
I could try to test with a file of 400MB
You also have latest Moralis server version?
VM6:1 POST https://adhpw3nnfjad.usemoralis.com:2053/server/files/video8.mp4 400
(anonymous) @ VM6:1
dispatch @ moralis.js:25496
ajax @ moralis.js:25503
(anonymous) @ moralis.js:25610
Promise.then (async)
request @ moralis.js:25604
saveBase64 @ moralis.js:13394
(anonymous) @ moralis.js:13348
tryCatch @ moralis.js:41120
invoke @ moralis.js:41351
(anonymous) @ moralis.js:41176
asyncGeneratorStep @ moralis.js:28195
_next @ moralis.js:28217
Promise.then (async)
asyncGeneratorStep @ moralis.js:28205
_next @ moralis.js:28217
(anonymous) @ moralis.js:28224
Wrapper @ moralis.js:32713
(anonymous) @ moralis.js:28213
(anonymous) @ moralis.js:13362
value @ moralis.js:12975
value @ moralis.js:13027
enviar @ Login.vue?013f:48
conectar @ Login.vue?013f:31
await in conectar (async)
onClick._cache.._cache. @ Login.vue?013f:4
callWithErrorHandling @ runtime-core.esm-bundler.js?9e79:6737
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js?9e79:6746
invoker @ runtime-dom.esm-bundler.js?8886:357
moralis.js:28263 Uncaught (in promise) Error: Invalid file upload.
at handleError (moralis.js:25632)
Iāve just updated to version 0.0.314, but still getting this
it looks like 100MB doesnāt work for me either now, I get timeout
it works fine with 100MB, I didnāt test it right initially
with 300MB it looks like it doesnāt work, can you test directly from cloud code?
https://docs.moralis.io/moralis-server/cloud-code/cloud-functions#ipfs
Okay, Iām not able to test right now, but I will and let you know. Tks so much. Anyway, Iāll have to make sure what the limit really is, to avoid my users to get stucked uploadingā¦
Letās hope itās just a server Chrismasā break and wait for Ivan Santa Claus giftsā¦
I tried to call the cloud function and give an url param like this:
const result = await Moralis.Cloud.toIpfs({
sourceType: "url",
source:
"https://drive.google.com/file/d/1B-XBWdgIkXXjZ6fxjLxGHFCT6c80kb_z/view?usp=sharing",
});
But I got:
TypeError: Moralis.Cloud.toIpfs is not a function
Otherwise, if I call: const result = await Moralis.Cloud.run(ātoIpfsā,{ params})
I get:
Error: Invalid function: ātoIpfsā
Am I missing anything?
Besides, what I would like to do is to allow the user to upload a local video (mp4) from his/her machine direct to IPFS. As there is not a sourceType related to this kind of format, what should I do? Do I have to encode the video before? Or upload to any other host and from there send by url?
you could convert it to base64 and then send it, but youāll have to test it how it works with big sizes, or upload it to any other host and from there send by url
I tested now with this code and it works fine for me:
Moralis.Cloud.define("try_ipfs", async (request) => {
const result = await Moralis.Cloud.toIpfs({
sourceType: "url",
source: "https://moralis.io/wp-content/uploads/2021/06/Moralis-Glass-Favicon.svg",
});
return result;
})
Great!
The coudFunction worked, but google and dropbox seem to block the url for download.
I will try to upload somewhere else and try from there.
Did you make it from an url?
I did it directly from Moralis SDK with 300MB
uploading from your local machine?
yes, from my local machine, but I used an upgraded server when it worked with 300MB
which version did you use?
I used an equivalent of $200/month server with latest Moralis Server version
Okay!
Iām still testing, so I am in the free plan yet. But it is nice to know it works in the paid ones. Do I need to go to a custom plan or the Pro version is eneough?
Pro version is something different than upgrading the servers, there are separate upgrades for servers so they have more processing power compared to the servers that are free.