Highly recommand to move S3_PUBLIC_DOMAIN sharing function to server side #3753
Lostsite
started this conversation in
Ideas | 灵感
Replies: 1 comment 2 replies
-
I don't think it's a good idea. It's unavailable on serverless deployment in Vercel. If you want to protect the s3, maybe it's better to have a signed url from S3 to for view. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My suggestion: request the file to a temp storage location on server, than ask the llm provider to download it directly from the server:
The problem for "S3_PUBLIC_DOMAIN" is many cheap "S3" storage providers are only "S3 compatible", many of them would NOT support "S3_PUBLIC_DOMAIN" on the basket level. Request to use "S3_PUBLIC_DOMAIN" would cause us can't use them.
(Also it is a pretty bad idea to keep a basket level sharing link alive all the time. If it leaks, it could cause trolls evilly pulling everything down again and again just to bill you, since usually "S3" storage are charged by downloads).
My suggestion is: 1st request the file to a temp storage location on server, than ask the llm provider to download it directly from the server:
Old method:
(llm provider) <----- ( File in S3 basket (permanent storage) )
New method:
(llm provider) <----- (File on server (request from S3, save for 1 -2h)) <-------- ( File in S3 basket (permanent storage) )
This would also benefits us if people wish to use the file multiple times, like download it during middle of one conversation, we can save some S3 download fee.
Beta Was this translation helpful? Give feedback.
All reactions