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

Use MultipartUpload for uploading chunks to s3 #28

Closed
4 tasks done
tobiasKaminsky opened this issue May 11, 2022 · 6 comments
Closed
4 tasks done

Use MultipartUpload for uploading chunks to s3 #28

tobiasKaminsky opened this issue May 11, 2022 · 6 comments
Labels
enhancement New feature or request 🍁 2023-Autumn

Comments

@tobiasKaminsky
Copy link
Member

tobiasKaminsky commented May 11, 2022

I will clarify client's side changes and then post more info.

@tobiasKaminsky
Copy link
Member Author

tobiasKaminsky commented May 12, 2022

  • based on chunking api
  • @juliushaertl checks
    • if/how existing chunks can be listed
    • if chunk size is allowed to be variable
  • API for clients
    • Header X-Chunking-Destination: files/user1/path/to/file.bin on each request of the chunked upload process (MKCOL/PUT/MOVE) (entire dav path)
    • same endpoint as chunkedUpload is used
    • name of chunks must be numerical
    • chunk count is <10000
    • old chunking is fallback
      --> streamline old and new chunking system, always send header

To test:

Clarify if this is a benefit for iOS at all

@juliusknorr
Copy link
Member

@tobiasKaminsky Sorry totally forgot to update you on the open points:

  • if/how existing chunks can be listed
    • Works now with the latest changes
  • if chunk size is allowed to be variable
    • This is possible as long as they are all larger than 5 MB (except the last chunk)

Regarding testing this if it is actually about a dev only setup you may use the minio play instance and just need to add this section to your config.php before installing Nextcloud, but files would then be uploaded to their public test instance:

Ref https://docs.min.io/minio/baremetal/console/minio-console.html

'objectstore' =>
        array (
            'class' => 'OC\\Files\\ObjectStore\\S3',
            'arguments' =>
            array (
                'bucket' => 'your-custom-bucket-name-maybe-random',
                'key' => 'Q3AM3UQ867SPQQA43P2F',
                'secret' => 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG',
                'hostname' => 'play.min.io',
                'port' => '9443',
                'use_ssl' => true,
                'use_path_style' => true,
                'autocreate' => true,
                'verify_bucket_exists' => true,
            ),
        )

@juliusknorr
Copy link
Member

juliusknorr commented Jun 12, 2022

Further updates:

  • Header name changed to X-S3-Multipart-Destination
  • Capability is now called s3-multipart in the dav section

Full reference at nextcloud/server#27034

@tobiasKaminsky tobiasKaminsky moved this to 🧭 Planning evaluation (dont pick) in 🤖 🍏 Mobile clients team Aug 18, 2022
@tobiasKaminsky
Copy link
Member Author

5mb as minimum for every chunks, except last one.

@schiessle
Copy link
Member

@tobiasKaminsky @juliushaertl sorry for digging out this old ticket. Does this also work if S3 is used as external storage or only with s3 primary storage?

@juliusknorr
Copy link
Member

Only primary storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🍁 2023-Autumn
Projects
Development

No branches or pull requests

4 participants