mirror of
https://github.com/fsouza/fake-gcs-server.git
synced 2026-04-26 14:15:49 +03:00
[GH-ISSUE #758] Self link and media link missing #127
Labels
No labels
bug
compatibility-issue
docker
documentation
enhancement
help wanted
needs information
pull-request
question
stale
unfortunate
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/fake-gcs-server#127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @robinjhector on GitHub (Apr 22, 2022).
Original GitHub issue: https://github.com/fsouza/fake-gcs-server/issues/758
Hello!
Whenever I use the Google storage java sdk to list blobs in a fake-gcs-server bucket, none of the blobs have their "self link" and "media link" populated. I'm assuming this is a bug?
@robinjhector commented on GitHub (Apr 25, 2022):
I'm quite dependent on this feature in my code :) Having the links available for verification in my tests would be awesome! The links themselfs could be totally fake or dead for my purposes. In other words, they don't have to work.
@fsouza commented on GitHub (Apr 25, 2022):
Hey, thanks for opening this issue. Do you know what they're usually set to? I can dig into the docs/run some real examples if not.
@robinjhector commented on GitHub (Apr 25, 2022):
https://cloud.google.com/storage/docs/json_api/v1/objects
I believe
mediaLinkis usually the link to view an image or media object directly, eg. in browser. I think GCS serves the binary data with the correct content-type header, and the browser solves the rest.SelfLink is the link to the object in the bucket, which, if I open it in a browser, will be downloaded.
@fsouza commented on GitHub (Apr 25, 2022):
Ohh interesting. Does that mean that it is not set for all objects?
@fsouza commented on GitHub (Apr 25, 2022):
I guess we don't need to care, we can just send the bytes with the appropriate Contet-Type and let the browser decide what to do with that.
For download we can do that + set Content-Disposition (or whatever the name of the header that forces download is).
@Jerome1337 commented on GitHub (Jan 16, 2023):
I'm facing the same issue today. This is not a blocker for me but it would be a real plus if the
mediaLinkis provided@andreoss commented on GitHub (Sep 7, 2023):
Any update on this?
@mdedetrich commented on GitHub (Nov 15, 2023):
Also facing the same issue, various clients for GCS don't work without this field because they assume its mandatory (and it should be).
@rtrzebinski-usc commented on GitHub (Nov 22, 2023):
Same issue here, please implement media link so it can be tested, thank you.
@manuteleco commented on GitHub (Mar 8, 2024):
I have obviously encountered the same issue. Perhaps #1524 helps everyone here, as it helps me.
However, I've noticed a similar problem (missing attributes that lead to failures in certain client libraries) in the
aclobject response attribute. That attribute contains an array of JSON documents, which are also supposed to containetag,selfLinkand possibly other attributes that are currently missing. At least that led to errors with this library, so watch out for that.Even though I've hit that similar other error with
acl, I didn't address it because I have implemented #1520 instead. For my current use case I don't need ACL information, so havingfake-gcs-serverrespect theprojectionparameter was enough for the time being. But if you need ACL information (projection=full), you might still hit a similar error until the missing attributes are added for ACLs as well, kind of like #1524 does for the top level attributes in the object response.