12 Commits
Author SHA1 Message Date
Naphat Amundsen 57fa0ece6f Fix issue presigning request with custom headers, also fix small deviation from spec related to lower case headers (#35)
Fix presigned URLs with custom headers (e.g., Content-Length) by:

1. Always URI-encoding query parameter values (removes incorrect special case for X-Amz-SignedHeaders)
2. Lowercasing header names per AWS Signature V4 spec

Fixes SignatureDoesNotMatch errors with Cloudflare R2 and other strict S3-compatible services.

PR: #35
Author: @Napam
2026-01-23 12:29:56 +05:30
Rohan Verma ba9ef916bc feat: add multipart upload support
"Verify the multipart upload implementation works correctly by running integration tests against MinIO and validating file integrity, parallel uploads, and error handling."

Core APIs:
- Add InitiateMultipartUpload for starting multipart uploads
- Add UploadPart for uploading individual parts (5MB-5GB)
- Add CompleteMultipartUpload to finalize uploads
- Add AbortMultipartUpload to cancel and cleanup uploads
- Add ListParts to query uploaded parts

High-Level Features:
- Add FileUploadMultipart API with automatic chunking
- Add uploadPartWithRetry with exponential backoff (3 retries default)
- Add parallel upload worker pool with configurable concurrency
- Add progress callbacks for real-time upload tracking
- Add GeneratePresignedUploadPartURL for browser-based uploads

Advanced Features:
- Automatic file chunking with configurable part sizes (5MB-5GB)
- Parallel upload worker pool with configurable concurrency
- Retry logic with exponential backoff (configurable retries)
- Real-time progress tracking with upload speed calculation
- Automatic cleanup on errors via AbortMultipartUpload
- Support for resumable uploads via ListParts
- Comprehensive input validation for all parameters
- File integrity verification across all upload modes

Testing:
- Add comprehensive integration tests (500+ lines)
- Test sequential uploads (15MB, 3 parts, ~45 MB/s)
- Test parallel uploads (20MB, 4 parts, concurrency=3)
- Test small files (3MB, single part)
- Validate abort and ListParts functionality
- Test input validation and error cases
- Verify file integrity with hash comparison
- All tests passing against MinIO

Documentation:
- Update README with multipart upload examples
- Add high-level and low-level API usage
- Document browser-based multipart uploads
- Mark multipart upload implementation as complete in ROADMAP
- Update gitignore to exclude *.bin and test-output.log

Verified against MinIO with complete test coverage.
2025-11-27 02:16:16 +05:30
Abhinav Raut 171b6756e1 feat: Add support for response-content-disposition in presigned URLs (#34)
* feat: add support for response-content-disposition in presigned URLs
- minor refactors

* remove extra comments
2025-11-26 12:31:22 +05:30
Pierre-Olivier Mercier bb9a56dda9 Rework presign to allow signature of endpoint given clients 2024-08-23 15:59:06 +02:00
jibin jose 2a542b05fe Fix: Add X-Amz-Security-Token to presigned url (#4)
Include the x-amz-security-token if signed with temporary credentials.

Ref:https://stackoverflow.com/questions/49306621/how-secret-is-the-session-token-in-aws-temporary-security-credentials/49344291#49344291
2020-04-13 16:44:33 +05:30
Rohan Verma aba89e779a refactor: minor doc changes 2019-12-11 13:54:46 +05:30
Liut 9a5e82a977 Add Endpoint for some compatible instance and fix time format (#3)
* Add Endpoint for some compatible instance.

* Fix: InvalidExpiration
* Fix: RequestTimeTooSkewed

Compatible s3: https://developer.qiniu.com/kodo/manual/4088/s3-access-domainname

* - clean code

* Fix: InvalidExpiration
2019-12-11 07:53:05 +00:00
Rohan Verma 20bc00a8c8 refactor: Presigned URL generator to use byte strings 2019-01-16 02:03:28 +05:30
Rohan Verma 8b0be7fb53 fix: Set protocol 2018-12-29 21:05:17 +05:30
Rohan Verma f50dc493f8 test: NewUsingIAM mock 2018-12-28 14:59:45 +05:30
Rohan Verma e4c7d93da1 Update readme and docstrings, minor refactors. 2018-12-24 17:31:36 +05:30
Rohan Verma d218b23f05 feat: Presigned URLs 2018-12-24 13:36:29 +05:30