问题描述
我正在尝试将来自 Google Oauth2 登录的初始图像设置为 Filepond,其 URL 为:https://lh3.googleusercontent.com/a-/AOh14GhJfspkJqSgHirQwIccUfUWMqWWvkX5qAmvXedS=s96-c ,但是当我检查“网络”选项卡时,我看到一个对“localhost:3000/account/edit-profile?fetch=”的请求由我试图从中获取图像的完全相同的链接转发,当然我收到了 404 错误来自请求,那么为什么它会这样?
const [files,setFiles] = useState([
{
source:
"https://lh3.googleusercontent.com/a-/AOh14GhJfspkJqSgHirQwIccUfUWMqWWvkX5qAmvXedS=s96-c",},])
return (
<FilePond
files={files}
dropOnPage
dropValidation
acceptedFileTypes='image/png,image/jpeg,image/gif'
stylePanelLayout='compact circle'
styleLoadindicatorPosition='center bottom'
styleProgressIndicatorPosition='right bottom'
styleButtonRemoveItemPosition='left bottom'
styleButtonProcessItemPosition='right bottom'
instantUpload={false}
imageResizeTargetWidth='200'
imageResizeTargetHeight='200'
imageCropAspectRatio='1:1'
imagePreviewHeight='170'
accept='image/png,image/gif'
maxFileSize='5MB'
name='files'
/>
来自网络检查器的图像:
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)