Comments (3)
I explored this a bit:
- It looks like AWS allows you to set ContentLength in PutObjectInput as you say. I haven't tested it. Does it require an exact match, or is a maximum length?
- GCS allows a range, via
storage.GenerateSignedPostPolicyV4
: https://stackoverflow.com/q/63230403. - I don't see any way to do this for Azure.
- I think fileblob could support an exact match.
This will be hard for you to contribute, because in order to test it we'd want to add a driver test, which will update all of our golden files and requires access to our test projects, but if we can find reasonable semantics that are supported across the providers I can add it.
from go-cloud.
Hi vangent thanks for the response!
As per my exploration on AWS, its exact content length.
So I guess only Azure that doesn't support this? Are you okay if we add this feature to go-cloud?
It'll be helpful for given usecase I think.
Thanks!
from go-cloud.
I looked into this some more. GCS doesn't support this either, at least not in the same way; it has https://pkg.go.dev/cloud.google.com/go/storage#GenerateSignedPostPolicyV4, but that's for POST, not PUT.
Given the lack of consistency across providers, I don't think it makes sense to add to Go CDK.
You can use As
(https://gocloud.dev/concepts/as/) and SignedURLOptions.BeforeSign
(https://pkg.go.dev/gocloud.dev/blob#SignedURLOptions) to set the PutObjectInput.ContentLength
for S3. Here's an example using As
for writes that should be similar: https://pkg.go.dev/gocloud.dev/blob#example-WriterOptions.
from go-cloud.
Related Issues (20)
- blob/fileblob/fileblob.go NoTempDir defaults to true and causes EXDEV cross device link errors HOT 3
- blob/gcsblob: anonymous bucket access follow up to #3302 HOT 1
- runtimevar: support `env` url HOT 2
- blob/azureblob: Using a SAS token results in "Signature fields not well formed" HOT 3
- Using AWS, how do we enable compression and decompression of upload and dwonload? HOT 5
- blob/s3: Support Server Side encryption settings in bucket url HOT 2
- docstore/mongodocstore: pauses before getMore HOT 3
- docstore/gcpfirestore: ought to support non-default databases HOT 4
- S3 Blob Incompatibility with AWS S3 Issues? HOT 3
- docstore: should support (in) comparison operator HOT 3
- pubsub: support NATS jetstream HOT 1
- pubsub/awssnssqs: duplicate key in map literal HOT 3
- pubsub/azuresb: support workload identity auth method HOT 3
- secrets/hashivault: read token from file HOT 3
- pubsub/azuresb: sending a message when unauthorized hangs HOT 1
- New Project: Docstore Query Gen for Go CDK HOT 1
- RabbitPubSub Queue Connection Closes Unexpectedly with FailedPrecondition Error HOT 2
- all: Request for new tag including 'Offset' feature in docstore HOT 1
- docstore/mongodocstore: Error update with only unset or increment modifier (recurring issue)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-cloud.