Does saving files incur a cost on Vercel?
So I need to chunk out large audio files(20-50mb) that are uploaded to my website, and break those out into 10 min chunks. I wrote the following snippet to do that
This runs fine locally, my only concern is I'm not sure what costs look like for saving files to the temp folder in vercel, and couldn't really find info on the pricing page? Am I randomly gonna get hit with a $1000 bill? Files get immediately deleted at the end of the API call if that matters.
5 Replies
I don't think so as long as they stay within the allowed storage cap. However you will use way more bandwidth than usual and therefore will likely get hit with a $1k bill
Ya I'm trying to think how we could reduce bandwidth because it does feel like I'm doing a lot of repeated uploading of the same file:
1) Upload the file to uploadthing so I have somewhere to store it
2) Download the file from uploadthing on our Server
3) Chunk the audio using the above code
4) Send the chunks from the server to whisper to get a transcription
Not sure if their is a step to be skipped here? But if I understand correctly, for a 20mb file, I'm actually incurring 60mb of bandwith cost?
That said I'm already on the pro tier, so it looks like I have a fair amount of bandwith to use? I'm actually confused as to which category this fits into on their current pricing table.
Do you really need uploadthing here?
Cause you are doing 2 bandwidth stuff there
Directly download it to your server
You don't need something else
Also maybe own your backend instead of relying on Vercel stuff
It sounds way more efficient and cheaper to learn and do so
Yes, the component looks something like this, I need it to be uploaded to uploadthing in order for users to be able to download their audio at a later date.
Why not download it from your own server instead?
It removes a dependency (avoid vector attack), it's cheaper in badnwidth and storage, you get more control over the features and security you can over, and you own your reliability instead of having the SLA of external stuff as a dependency