[Bug] 上传文件报错,已经对接cloudflareR2存储 #3783
Replies: 20 comments 3 replies
-
📦 Deployment environmentVercel 📌 Software version1.15.12 💻 System environmentmacOS 🌐 BrowserChrome 🐛 Problem descriptionThe prompts for directly uploading files in the dialog box are as follows: 📷 Steps to reproduceNo response 🚦 Expected resultsNo response 📝 Supplementary informationNo response |
Beta Was this translation helpful? Give feedback.
-
Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. |
Beta Was this translation helpful? Give feedback.
-
Hey @whistle003, I'm here to help you with any bugs, questions, or contributions! I'm Dosu, a bot designed to assist you. Let's squash this bug together! 🤖 I found a similar closed issue that might be relevant to your problem: [Bug] 使用cloudflare的r2储存上传图片提示错误 [1]. To resolve the file upload error in Vercel when using Cloudflare R2 storage, you need to configure the cross-origin resource sharing (CORS) settings correctly and ensure that all necessary environment variables are set up properly. Here are the steps to do so:
By following these steps, you should be able to resolve the file upload error related to network and cross-origin configuration when using Cloudflare R2 storage with Vercel. Additionally, ensure that all environment variables are correctly set up in Vercel to avoid any issues with database migration or other configurations [2][3][4]. |
Beta Was this translation helpful? Give feedback.
-
可以右键网页,最底部“检查”,选择“网络”标签,然后再次做上传行为,以查看错误详情。最后请截图传到此处。 |
Beta Was this translation helpful? Give feedback.
-
You can right-click the web page, "Inspect" at the bottom, select the "Network" tab, and then upload again to view the error details. Finally, please take a screenshot and upload it here. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
大佬,这个跨域配置,我域名填写的自己对接到vercel的,一定要用他默认的https://your-project.vercel.app吗? |
Beta Was this translation helpful? Give feedback.
-
写你 vercel 部署的 lobechat 域名,可以是自定义的。 |
Beta Was this translation helpful? Give feedback.
-
Write the domain name of your lobechat deployment, which can be customized. |
Beta Was this translation helpful? Give feedback.
-
难受了,我严格按照文档操作的,其他的都很完美,就上传文件出错 |
Beta Was this translation helpful? Give feedback.
-
改了还是不行?你 cors 策略怎么写的,域名就写你的 https://chat.funqie.fun |
Beta Was this translation helpful? Give feedback.
-
It still doesn't work after changing it? How do you write your cors policy? The domain name should be yours: https://chat.funqie.fun |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
https://private-user-images.githubusercontent.com/64147479/364771202-09136311-642f-4ed2-85c5-3c8f37cfab0d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIu Y29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1NDA4NTAsIm5iZiI6MTcyNTU0MDU1MCwicGF0aCI6Ii82NDE0NzQ3OS8zNjQ3NzEy MDItMDkxMzYzMTEtNjQyZi00ZWQyLTg1YzUtM2M4ZjM3Y2ZhYjBkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFp BJTJGMjAyNDA5MDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA1VDEyNDkxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdhYmZmMzI xYjdlMjk1MzZiMmQ5NDQ3MmE0MTk3MzVmYzc1ZjIyNTc5YjI3MjI5YmUzNTVmYjhjODcxMzM0NjQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmV wb19pZD0wIn0.1OrDgJyhl6g_5Wtz68lQBn7f9v2_jHo_b0BYZdAkRc4 |
Beta Was this translation helpful? Give feedback.
-
有没有可能是S3_PUBLIC_DOMAIN的问题?我用的是https://s3.funqie.fun/ |
Beta Was this translation helpful? Give feedback.
-
Is it possible that it is a problem with S3_PUBLIC_DOMAIN? I use https://s3.funqie.fun/ |
Beta Was this translation helpful? Give feedback.
-
按文档来的话,是没错的。 |
Beta Was this translation helpful? Give feedback.
-
According to the documentation, it is correct. |
Beta Was this translation helpful? Give feedback.
-
📦 部署环境
Vercel
📌 软件版本
1.15.12
💻 系统环境
macOS
🌐 浏览器
Chrome
🐛 问题描述
对话框直接上传文件提示如下:
“请确认你的网络是否正常,并检查文件存储服务跨域配置是否正确”
左侧文件管理上传文件无任何反馈,一直显示准备上传
📷 复现步骤
No response
🚦 期望结果
No response
📝 补充信息
No response
Beta Was this translation helpful? Give feedback.
All reactions