You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "baszalmstra (via GitHub)" <gi...@apache.org> on 2023/03/21 16:36:36 UTC

[GitHub] [incubator-opendal] baszalmstra opened a new issue, #1726: Overwrite Reponse headers for presigned URL

baszalmstra opened a new issue, #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726

   Im building a content addressable store where files in storage are named after their content hash. When requesting a certain file from our service we look up the content hash and create a pre-signed URL with opendal based on the hash. However, when Im then redirected the downloaded file will be named the same as the hash. I could modify the metadata of the objects in the object store to include the "content-disposition" but that slightly defeats the purpose of the content-addressable object store.
   
   AWS supports `response-content-disposition` as well as some other headers to control the headers returned from the redirect. Is that also something opendal could support when using `presign_read`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo closed issue #1726: Overwrite Reponse headers for presigned URL

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo closed issue #1726: Overwrite Reponse headers for presigned URL
URL: https://github.com/apache/incubator-opendal/issues/1726


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1480884553

   > @Xuanwo is there anything I can help with?
   
   Thanks a lot!
   
   There are two things we need to do:
   
   ## Add `writer_with` for `Operator`
   
   [OpWrite](https://docs.rs/opendal/0.30.3/opendal/ops/struct.OpWrite.html) already supports [with_content_disposition](https://docs.rs/opendal/0.30.3/opendal/ops/struct.OpWrite.html#method.with_content_disposition), but we only expose them in `write_with`.
   
   We can add a `writer_with` with allow users to specify the `content_disposition` during `write`.
   
   ## Add `response_content_disposition` support in `OpRead`
   
   I am currently not confident about this feature and require some time to reconsider it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] baszalmstra commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "baszalmstra (via GitHub)" <gi...@apache.org>.
baszalmstra commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1489225445

   @Xuanwo With #1739 merged would you be open to adding additional headers? S3 supports these:
   
   * response-content-type
   * response-content-language
   * response-expires
   * response-cache-control
   * response-content-disposition
   * response-content-encoding
   
   I'm mostly interested in `response-cache-control`. I can also do this by using the `OpWrite::cache_control` as proposed in #1735 but for my use-case being able to do this per request would be kinda nice. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1478830999

   This feature request is reasonable. I will consider how to incorporate it with other features.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] baszalmstra commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "baszalmstra (via GitHub)" <gi...@apache.org>.
baszalmstra commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1479677141

   That would be great!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1490017044

   > Done in #1804
   
   So quick!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] ClSlaid commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "ClSlaid (via GitHub)" <gi...@apache.org>.
ClSlaid commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1479586925

   We currently provide a `with_content_disposition` option for `OpWrite`, can this cover your need? 👀️
   https://docs.rs/opendal/latest/opendal/ops/struct.OpWrite.html#method.with_content_disposition


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1489976741

   > I'm mostly interested in `response-cache-control`
   
   Let's add it!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1479625345

   Yes, they can. But I think there are different feature request.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] baszalmstra commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "baszalmstra (via GitHub)" <gi...@apache.org>.
baszalmstra commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1490238508

   Although I have what I need which additional headers do you think we should add to close this PR?
   
   * response-content-type
   * response-content-language
   * response-expires
   * response-content-encoding
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1490241421

   > Although I have what I need which additional headers
   
   Let's prioritize closing this issue first. We can add new features as users request them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] baszalmstra commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "baszalmstra (via GitHub)" <gi...@apache.org>.
baszalmstra commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1490005470

   Done in #1804 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] baszalmstra commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "baszalmstra (via GitHub)" <gi...@apache.org>.
baszalmstra commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1479654371

   Well yes partially. I can have different files with the same content but with different filenames.
   
   But Im also using the Writer api because Im uploading pretty big files, but unfortunately when using a writer there doesnt seem to be a way to specify the OpWrite. Or did I miss that?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] baszalmstra commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "baszalmstra (via GitHub)" <gi...@apache.org>.
baszalmstra commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1480869176

   @Xuanwo is there anything I can help with?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1480962035

   > I am currently not confident about this feature and require some time to reconsider it.
   
   I have an idea on how to handle them. I will initiate a RFC for this.
   
   > But maybe we can also add that to OpWrite?
   
   Yes. Let's disscuss it in the RFC.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] baszalmstra commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "baszalmstra (via GitHub)" <gi...@apache.org>.
baszalmstra commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1480922412

   Thanks I will take a look at "Add writer_with for Operator".
   
   Another use case for the response stuff is that you can also specify the cache-control header (at least for s3). Given that my data is stored in an immutable fashion it would be nice to be able to communicate that to the browser/user as well. But maybe we can also add that to `OpWrite`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-opendal] Xuanwo commented on issue #1726: Overwrite Reponse headers for presigned URL

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on issue #1726:
URL: https://github.com/apache/incubator-opendal/issues/1726#issuecomment-1479672506

   > But Im also using the Writer api because Im uploading pretty big files, but unfortunately when using a writer there doesnt seem to be a way to specify the OpWrite. Or did I miss that?
   
   Oh, yes. We should support `writer_with` too.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org