Closed alex-croitoriu closed 2 months ago
try this: https://vercel.com/docs/build-output-api/v3/primitives
learn more about the file system in vercel from this link and let me know if everything worked properly
Unfortunately I couldn't get it to work using nuxt-file-storage. I honestly don't even know if it can be done, Vercel probably won't let me access absolute paths outside of the .output folder. I resorted to using Vercel Blob, which does the job for me.
Unfortunately I couldn't get it to work using nuxt-file-storage. I honestly don't even know if it can be done, Vercel probably won't let me access absolute paths outside of the .output folder. I resorted to using Vercel Blob, which does the job for me.
It will be of great help if you can share with us the configuration settings for Vercel Blob usage.
Sure, it's actually pretty straight forward. After you create your blob and connect it to your project on Vercel, you need to install the @vercel/blob
dependency and copy the BLOB_READ_WRITE_TOKEN
variable and put it in your .env file. That's all, after that you can upload files like this:
import { put } from "@vercel/blob";
const { url } = await put('articles/blob.txt', 'Hello World!', { access: 'public' });
I'm trying to get my nuxt project working on a Vercel deployment. Locally I am setting the MOUNT env variable according to my local file system and it works just fine. On Vercel however, I don't know what path I should configure for the mount variable for my app to work correctly. I don't know what the absolute path is supposed to be on a Vercel deployment.