Highly recommand to move S3_PUBLIC_DOMAIN sharing function to server side #3753
-
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: New method: 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.
Replies: 1 comment 6 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.
@Lostsite @xynova the #4254 is merged. Now you can set
S3_SET_ACL=0
to use private url