[GH-ISSUE #1116] API copy Object should return an object resource on success. #165

Closed
opened 2026-03-03 12:08:51 +03:00 by kerem · 0 comments
Owner

Originally created by @can-ne on GitHub (Apr 3, 2023).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1116

Hi!
First of all, thank you for developing this. It's an invaluable tool for local development 👏

Problem

I found that the copyTo and rewriteTo API is using the same rewriteObject function.
The rewriteTo API is OK but copyTo API response the same make client library didn't work.
Can you update the rewriteObject function to return an object resource if request to copyTo API.

github.com/fsouza/fake-gcs-server@e610de42cc/fakestorage/server.go (L257-L258)

You can check the docs of GCS for more information:

Proposed solution

Check the path if it is copyTo request return an object resource.

Thank you!

Originally created by @can-ne on GitHub (Apr 3, 2023). Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/1116 Hi! First of all, thank you for developing this. It's an invaluable tool for local development 👏 ## Problem I found that the copyTo and rewriteTo API is using the same rewriteObject function. The rewriteTo API is OK but copyTo API response the same make client library didn't work. Can you update the rewriteObject function to return an object resource if request to copyTo API. https://github.com/fsouza/fake-gcs-server/blob/e610de42cc1616d910ce74f21cf12b69e827aa5c/fakestorage/server.go#L257-L258 <details><summary>You can check the docs of GCS for more information:</summary> <p> - https://cloud.google.com/storage/docs/json_api/v1/objects/rewrite#response - https://cloud.google.com/storage/docs/json_api/v1/objects/copy#response </p> </details> ## Proposed solution Check the path if it is copyTo request return an object resource. Thank you!
kerem closed this issue 2026-03-03 12:08:51 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#165
No description provided.