C # after image upload, get uploaded image url in google cloud storage

I have created an image loader using C # mvc5. I was able to upload images to google cloud storage. Now I want the url of the uploaded file to be returned to the user for reference . I google docs and can't find them. Anyone can provide me with some links or codes that would be helpful. Thank.

+3


source to share


1 answer


See the documentation page Request URI .

In general, if you load into a bucket with a name foo

and an object with a name bar/baz

, the url for your object will be:

https://storage.googleapis.com/foo/bar/baz

      



With the GCS C # .NET library , you can use one of the Storage.v1.Data.Object storage properties :

  • MediaLink to get a download link, or
  • SelfLink to get the canonical URL for the object.
0


source







All Articles