Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where is incorrect? I want to upload an image file to "amazonaws" #21

Closed
inshyma opened this issue Jan 22, 2021 · 3 comments
Closed

where is incorrect? I want to upload an image file to "amazonaws" #21

inshyma opened this issue Jan 22, 2021 · 3 comments

Comments

@inshyma
Copy link

inshyma commented Jan 22, 2021

Future<String> minioUploadFile( String bucketName, String key, String endPoint, String accessKey, String secretKey, String sessionToken, { File file, String fileName, String port, String region, }) async { assert(file != null || (fileName != null && fileName.isNotEmpty)); final minio = Minio( endPoint: 's3-us-west-1.amazonaws.com', accessKey: accessKey, secretKey: secretKey, sessionToken: sessionToken, region: 'us-west-1', enableTrace: true, ); return await minio.fPutObject( bucketName, key, fileName ?? file.absolute.path); }

@vgula
Copy link

vgula commented Jan 22, 2021

What's the key in your fPutObject?

@inshyma
Copy link
Author

inshyma commented Jan 23, 2021

just like "avatar/2021/01/xxxxxxxxxxxxxxxx.jpg"

@ramsmart-inno
Copy link

In the Key area, you pass a string of custom names with extension type.

Like, "my_snap.jpeg".

@inshyma inshyma closed this as completed Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants