Get public url for object uploaded on cloud storage

独自空忆成欢 提交于 2020-12-06 07:00:23

问题


I uploaded a pdf file on cloud storage. But when i access url https://storage.cloud.google.com/[BUCKET]/[FILE].jpg i am redirected to google signin page. Is there any way to get a public url which gives direct access to file and doesnt have CORS issues.


回答1:


It was silly mistake. Use

storage.googleapis.com/<bucketName>/<fileName> 

instead of

storage.cloud.google .com/<bucketName>/<fileName> 


来源:https://stackoverflow.com/questions/55259932/get-public-url-for-object-uploaded-on-cloud-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!