Home > database >  Flutter upload files to AWS s3 faster with upload progress
Flutter upload files to AWS s3 faster with upload progress

Time:12-23

am facing a problem while uploading one or more files i.e images/videos to AWS s3 bucket by using aws_s3_client plugin.

  1. It's taking much time to upload a 10MB file
  2. Not able to track the upload progress percentage
  3. Not having option to upload multiple file at once (if same bucket)
  4. Every time while uploading we have to verify the IM-User access. (since why cant we use single instance at once to verify and keep connection persistent/keep alive until application getting closed)

Hence, am not familiar with AWS services. So, suggest to me a best way to upload a file or multiple files to AWS s3 bucket with faster, with upload progress percentage, multiple file upload at once and persistent connection /Keep Alive verification.

CodePudding user response:

For 1 and 2, use managed uploads, it provides an event to track upload progress and makes uploads faster by using multipart upload. Beware that multipart uploads only work for files having sizes from 5 MB to 5 TB.

For 3, AWS S3 does not allow uploading files having same names or keys in the same bucket. Depending on your requirement, you can turn on versioning in your bucket and that will save different versions of the same file.

For 4, you can generate and use pre-signed URLs. Pre-signed URLs have configurable timeouts that you can adjust depending on how long you want the link to be available for an upload.

CodePudding user response:

  1. Use multi part upload.multi part upload will upload files quickly to S3. https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html
  • Related