|
|
|
|
|
by davidkarolyi
745 days ago
|
|
I will kindly ignore the mental breakdown. About the rest:
For s3 you need to instantiate the client, and the only part you're correct about is that the client credentials can be also auto detected from env vars. Let's boil the rest down:
- For S3 you will need to add 2 env vars: AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY_SECRET. In case you don't have other AWS keys in your env for other services this will be auto detected by the client. (Still needs to be instantiated), so you can cross off the 2 lines for creadentials. - For FILE0 you need to add 1 env var: F0_SECRET_KEY. Then import the client which is autodetecting your env.
```
import {f0} from 'file0'; f0.set('myshit.png', myFile);
``` I'll let everyone be the judge of which one is simpler for them. And you should also use whichever you like more. I will sleep good at night either way and keep using file0. |
|