Serving STATIC FILES while DEPLOYING to VERCEL
Unanswered
beecode posted this in #help-forum
beecodeOP
I want to host my nextjs Project with vercel. But I have some static folders which is not pushed to repo but is used within the project. So during the build process on Vercel. I would like to use these static folders from S3 and build the project. CAN ANYONE HELP?
8 Replies
@beecode I want to host my nextjs Project with vercel. But I have some static folders which is not pushed to repo but is used within the project. So during the build process on Vercel. I would like to use these static folders from S3 and build the project. CAN ANYONE HELP?
you can either use a cdn to access your files from s3 or get the file directly from s3.
This is how you can access it directly:
This is how you can access it directly:
https://<bucketname>.s3.<region>.amazonaws.com/<filekey>beecodeOP
Where do I have to import this?? Within script???
you dont import it. You use it in your images/videos/...
For example like:
Then it will be loaded from the server
For example like:
<img src={"https://<bucketname>.s3.<region>.amazonaws.com/<filekey>"}/>Then it will be loaded from the server
beecodeOP
I did not meant something like images or videos but the whole library thing...
@beecode I did not meant something like images or videos but the whole library thing...
can you please clarify what and how you want it?
beecodeOP
I have got charting library file from Tradingview which helps to create trading view charts and widget but i do not want to include these static lirbrary file on my repo and on local machine i have added this on my public/static and added this file to git ignore now when I try to deploy on vercel free without storage, I have these same files on S3 static folder and want my vercel deployment to get those library files from my S3. These folders are of size 200mb+
@beecode I have got charting library file from Tradingview which helps to create trading view charts and widget but i do not want to include these static lirbrary file on my repo and on local machine i have added this on my public/static and added this file to git ignore now when I try to deploy on vercel free without storage, I have these same files on S3 static folder and want my vercel deployment to get those library files from my S3. These folders are of size 200mb+
when you installing these library files fresh and new, would you use npm?
beecodeOP
Nope i am importing them from local static folder they are not available on npm and we cannot place them in nom