* Add a flag to disable downloads of uploaded files
* Add a flag to disable deletion of uploaded files
* Fix spelling error
* Rename `DisableDelete` to `DisableTermination`
* Also rename CLI flag
* Conditionally build the `Access-Control-Allow-Methods` headers
* Update tests with new order of allowed methods header
* Add test for checking conditional `Access-Control-Allow-Methods` header
* Create `isAzureError` function
* Throw 404 is info file is not found
* Use `isAzureError` in GetOffset function
* Make `GetUpload` match others without named returns
* Follow code style for `isAzureError` not returning but setting `err` to value
* Return not found when the blob is not found
This will also be triggered when the blob is being uploaded but not yet committed
* Return not found if blob is not found when getting offset
* Don't return error in GetUpload if GetOffset returns `handler.ErrNotFound`
* fix: if a race condition occur, we check for it in the test
* fix: windows sometimes only has 1 file
* Trigger test runs
* Trigger test runs
* Trigger test runs
* Trigger test runs
* Trigger test runs
See https://github.com/tus/tusd/pull/480
Squashed commit of the following:
commit 7439fd84a6103afdedaf94701a65ce4376789380
Author: Marius <marius@transloadit.com>
Date: Mon Oct 18 00:27:12 2021 +0200
Docs and test
commit 16d9dc67e8c8eefc328b1ce12d7e7ca01a49f9f6
Merge: bae0ffbbea5183
Author: Marius <marius@transloadit.com>
Date: Mon Oct 18 00:23:13 2021 +0200
Merge branch 'head_header_check' of https://github.com/s3rius/tusd into s3rius-head_header_check
commit bea5183ec3
Author: Pavel Kirilin <win10@list.ru>
Date: Thu May 20 19:53:36 2021 +0400
Fixed "Tus-Resumable" header check for HEAD request.
Signed-off-by: Pavel Kirilin <win10@list.ru>
* Only determine object type based on name after last separator
* modify test to keep in mind directory prefixes with underscores in them
* update documentation to reflect support of underscores in gcs object prefix
* Add azure-storage-blob-go dependency
* Implement Azure BlobStorage store
* Add AzureStore Mock test
* Refactor Blob interfaces to use uppercase fields
* Refactor and remove the Create function
When getting the offset, and we get the status code BlobNotFound, we can say the offset is 0, and start from the beginning
* Update the mock
* Refactor error checking of GetOffset to actually check the service code
* Begin testing azurestore
* Write more tests
* New feature allows to set access type on new containers and blob access tier
* Write more docs
* Upgrade azure-storage-blob-go to v0.13.0
* Remove AzError, not needed
* Update link to container access type information
* Remove ?toc from link in comments
* Remove trailing spaces from workflow
* Run tests with go1.15 and 1.16
* Don't fail fast
This lets all other tests complete, and makes it easier to see if it's just a one-off fail, or on different OSes and versions
* Remove darwin 386 from `build_all.sh` script
Removed in go1.15 https://github.com/golang/go/issues/37610
* Update go version in `Dockerfile`
* Compile for Apple Silicone (darwin arm64)
Only go1.16 supports it
* Allow empty metadata values
* Make tests less fragile by allowing loose call ordering
* Add s3ChunkProducer
* Integrate s3ChunkProducer to support chunk buffering
* Remove completed chunk files inline to reduce disk space usage
* Add tests for chunk producer
* docs: Use value from Host header to forward to tusd
* Use int64 for MaxBufferedParts field
* Default to 20 buffered parts
* Rename s3ChunkProducer -> s3PartProducer
* Document s3PartProducer struct
* Clarify misleading comment
* Revert "Remove completed chunk files inline to reduce disk space usage"
This reverts commit b72a4d43d6.
* Remove redundant seek
This is already being done in s3PartProducer.
* Clean up any remaining files in the channel when we return
* Make putPart* functions responsible for cleaning up temp files
* handler: Add tests for empty metadata pairs
* Factor out cleanUpTempFile func
* Add test to ensure that temporary files get cleaned up
Co-authored-by: Jens Steinhauser <jens.steinhauser@gmail.com>
Co-authored-by: Marius <marius@transloadit.com>
* core: add new synchronous event: pre-finish
* docs: pre-finish hook event
* docs: Added information about CORS to the FAQ. (#384)
* Added information about CORS to the FAQ.
* docs: Expand explanation of CORS
Co-authored-by: Marius <marius@transloadit.com>
* cli: add header forwarding in HTTP hooks (#371)
* cli: add header forwarding in HTTP hooks
* docs: Reword header forwarding flag, add documentation
* Don't enable pre-finish hooks by default
* Enable pre-finish hooks for plugins
* docs: default enabled hooks
* Rename callback
Co-authored-by: josh-marshall-jax <52457971+josh-marshall-jax@users.noreply.github.com>
Co-authored-by: Marius <marius@transloadit.com>
* Add MetadataObjectPrefix field to S3Store
* Add metadataKeyWithPrefix helper function
* Use metadataKeyWithPrefix for .info and .part operations
* Add s3store tests for metadata object prefixes
* Clarify ObjectPrefix docs