Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

保存时提示: The request is not allowed by the user agent or the platform in the current context. #33

Closed
liqiwenx opened this issue Jan 2, 2024 · 6 comments
Labels
question Further information is requested

Comments

@liqiwenx
Copy link

liqiwenx commented Jan 2, 2024

你好,感谢作者移植这个插件.

我在笔记文档中插入该这个挂件,然后打开了一个drawio.svg文件后, 编辑后再次保存报了如下错误, svg文件保存在工作空间data/assets 目录下的, 请问这时什么原因导致的呢

The request is not allowed by the user agent or the platform in the current context.

image

我是用的是思源社区版本v2.11.4, win10
https://github.com/siyuan-community/siyuan/releases/tag/v2.11.4

@Zuoqiu-Yingyi
Copy link
Owner

我这里未能复现该问题
能在保存时使用开发者工具查看一下响应的网络请求或控制台输出吗

@liqiwenx
Copy link
Author

liqiwenx commented Jan 3, 2024

我这里未能复现该问题 能在保存时使用开发者工具查看一下响应的网络请求或控制台输出吗

我不熟悉web技术,发现控制台中有标红提示,截图给你,不知道是不是所需要的log。

image

@Zuoqiu-Yingyi
Copy link
Owner

image

如果不使用 Google Drive 的话该错误可以忽略


The request is not allowed by the user agent or the platform in the current context.

我未找到 drawio 内有相关字段, 请问这个问题是在保存至思源时弹出的吗?

不过我找到了一个相似的问题, 可以参考一下: jgraph/drawio#2172

@liqiwenx
Copy link
Author

liqiwenx commented Jan 3, 2024

我测试了一下,如果直接在挂件中新建drawio文件是可以正常保存的。如果是一个已有的文件,在挂件中点击【文件】-【从...打开】-【设备】打开已有文件则在编辑后无法再次保存,会报错。

再次测试了一下思源中【设置】-【关于】-【在浏览器上使用】,在浏览器中使用思源,保存后会弹框,点击【保存更改】可以正常保存。结合你给的参考,看起来是在思源上存在文件写如权限问题。

image

@Zuoqiu-Yingyi
Copy link
Owner

Zuoqiu-Yingyi commented Jan 3, 2024

我测试了一下,如果直接在挂件中新建drawio文件是可以正常保存的。如果是一个已有的文件,在挂件中点击【文件】-【从...打开】-【设备】打开已有文件则在编辑后无法再次保存,会报错。

哦, 那我知道原因了, drawio 会默认使用一开始选择的文件存储方案
导入已存在的文件可以先使用如下方案顶顶

方案1

  • 在 drawio 挂件中新建一个绘图
  • 使用 文件 > 从...导入 > 设备 菜单项导入文件
  • 保存绘图文件至思源

方案2:

  • 将文件上传到思源
  • 修改 drawio 挂件块的块属性 data-assets

@Zuoqiu-Yingyi Zuoqiu-Yingyi added the question Further information is requested label Jan 3, 2024
@liqiwenx
Copy link
Author

liqiwenx commented Jan 3, 2024

好的,感谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants