memos icon indicating copy to clipboard operation
memos copied to clipboard

不同域名导致对象存储的图片无法显示

Open cuiyanjie opened this issue 2 years ago • 1 comments

Describe the bug

我有两个域名都指向了同一个Memos,经常用A访问来写卡片传图片,图片上传到腾讯云对象存储,我发现用B域名访问时,所有对象存储的图片都看不到了,只有占位符,无论是文章里还是资源库,都显示不了图片(文件在),单击打开也不显示,复制地址然后浏览器打开是对的,没问题。 换成IP访问也有上述问题,只有使用当初传图片的A域名访问才没有问题。 但无论是A域名还是B域名,使用OpenAPI(域名不一样)通过Kirika同步到本地的时候,不显示的图片都可以顺利同步到本地。

Steps to reproduce

我有两个域名都指向了同一个Memos,经常用A访问来写卡片传图片,图片上传到腾讯云对象存储,我发现用B域名访问时,所有对象存储的图片都看不到了,只有占位符,无论是文章里还是资源库,都显示不了图片(文件在),单击打开也不显示,复制地址然后浏览器打开是对的,没问题。 换成IP访问也有上述问题,只有使用当初传图片的A域名访问才没有问题。 但无论是A域名还是B域名,使用OpenAPI(域名不一样)通过Kirika同步到本地的时候,不显示的图片都可以顺利同步到本地。

Screenshots or additional context

No response

cuiyanjie avatar Jul 07 '23 08:07 cuiyanjie

Issue is not in English. It has been translated automatically.


Title: Different domain names lead to the inability to display the image of the object storage

Describe the bug

I have two domain names pointing to the same Memos. I often use A access to write cards to upload pictures, and the pictures are uploaded to Tencent Cloud Object Storage. No matter whether it is in the article or in the resource library, the picture cannot be displayed (the file is in), and it will not be displayed when you click to open it. Copying the address and then opening it in the browser is correct, no problem. Switching to IP access also has the above-mentioned problems, and there is no problem only when using the A domain name that originally uploaded the picture to access. However, whether it is domain name A or domain name B, when using OpenAPI (the domain name is different) to synchronize to the local through Kirika, the pictures that are not displayed can be successfully synchronized to the local.

Steps to reproduce

I have two domain names pointing to the same Memos. I often use A access to write cards to upload pictures, and the pictures are uploaded to Tencent Cloud Object Storage. No matter whether it is in the article or in the resource library, the picture cannot be displayed (the file is in), and it will not be displayed when you click to open it. Copying the address and then opening it in the browser is correct, no problem. Switching to IP access also has the above-mentioned problems, and there is no problem only when using the A domain name that originally uploaded the picture to access. However, whether it is domain name A or domain name B, when using OpenAPI (the domain name is different) to synchronize to the local through Kirika, the pictures that are not displayed can be successfully synchronized to the local.

Screenshots or additional context

No response

Issues-translate-bot avatar Jul 07 '23 08:07 Issues-translate-bot

可能是个跨域问题,和 memos 本身无关,可以去了解下相关的知识点

  • https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

boojack avatar Sep 10 '23 04:09 boojack

Issue is not in English. It has been translated automatically.


It may be a cross-domain issue and has nothing to do with memos itself. You can learn about the relevant knowledge points.

  • https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

Issues-translate-bot avatar Sep 10 '23 04:09 Issues-translate-bot