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 image file name is too long and truncated abnormally #9129

Closed
3 tasks done
pisceswb opened this issue Sep 7, 2023 · 10 comments
Closed
3 tasks done

The image file name is too long and truncated abnormally #9129

pisceswb opened this issue Sep 7, 2023 · 10 comments
Assignees
Labels
Milestone

Comments

@pisceswb
Copy link

pisceswb commented Sep 7, 2023

将长文件名图片插入思源笔记出错

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

如题,将文件名为“this is a test,1,这是一个测试,2,this is a test,3,这是一个测试,4,this is a test,5,这是一个测试,6,this is a test,7,这是一个测试,8,this is a test,9,这是一个测试,10,this is a test,11,这是一个测试,12.png”的图片复制到思源笔记或直接拖动到思源笔记时,不能正确将图片插入。

Expected result

允许长文件名图片插入思源笔记

Screenshot or screen recording presentation

No response

Version environment

- Version: 2.10.3
- Operating System: win10
- Browser (if used):

Log file

1

More information

No response

@WingDr
Copy link

WingDr commented Sep 7, 2023

有没有可能是因为Windows的路径长度限制?参考这个

@88250
Copy link
Member

88250 commented Sep 7, 2023

长文件名的截断处理有问题,感谢反馈。

REF: #7099

@88250 88250 added the Bug label Sep 7, 2023
@88250 88250 self-assigned this Sep 7, 2023
@88250 88250 added this to the 2.10.4 milestone Sep 7, 2023
@88250 88250 changed the title 将长文件名图片插入思源笔记出错 The image file name is too long and truncated abnormally Sep 7, 2023
@88250 88250 closed this as completed Sep 7, 2023
@pisceswb
Copy link
Author

pisceswb commented Sep 7, 2023

@请问D大,能够保留原长文件名,而不将其截断吗?
使用场景为:①使用quicker截图PDF,以路径+标题命名截图文件。②将截图复制到思源笔记中。③因为图片文件名中含有完整路径和PDF文件名,经过对路径简单处理后即可找到并打开原PDF文件。
因此,需要完整的图片名称,而不要将其截断,只取部分内容。
谢谢!

@88250
Copy link
Member

88250 commented Sep 7, 2023 via email

EightDoor added a commit to EightDoor/siyuan that referenced this issue Sep 7, 2023
* commit '097501c84c56d5a0083a5bd29fc7efe686ee70b9': (82 commits)
  🎨 fix siyuan-note#9123
  🐛 fix siyuan-note#9135
  🎨 Remove av block also remove node attr siyuan-note#9091 (comment)
  🎨 Remove av block also remove node attr siyuan-note#9091 (comment)
  🎨 Remove av block also remove node attr siyuan-note#9091 (comment)
  🎨 Update av
  🐛 siyuan-note#9126
  💄
  🐛 The image file name is too long and truncated abnormally Fix siyuan-note#9129
  💄
  🎨 The cloud sync directory name (Bucket) supports up to 63 characters siyuan-note#9130
  🔥 Revert Improve block loading performance on Windows/Linux/macOS amd64 arch Fix siyuan-note#9131
  💄
  📱 fix siyuan-note#9113
  📱 fix siyuan-note#9127
  📱  fix siyuan-note#9111
  📱  fix siyuan-note#9111
  🚨
  ⚡ Improve block loading performance on Windows/Linux/macOS amd64 arch siyuan-note#9084
  🎨 Update text
  ...
EightDoor added a commit to EightDoor/siyuan that referenced this issue Sep 7, 2023
* develop: (82 commits)
  🎨 fix siyuan-note#9123
  🐛 fix siyuan-note#9135
  🎨 Remove av block also remove node attr siyuan-note#9091 (comment)
  🎨 Remove av block also remove node attr siyuan-note#9091 (comment)
  🎨 Remove av block also remove node attr siyuan-note#9091 (comment)
  🎨 Update av
  🐛 siyuan-note#9126
  💄
  🐛 The image file name is too long and truncated abnormally Fix siyuan-note#9129
  💄
  🎨 The cloud sync directory name (Bucket) supports up to 63 characters siyuan-note#9130
  🔥 Revert Improve block loading performance on Windows/Linux/macOS amd64 arch Fix siyuan-note#9131
  💄
  📱 fix siyuan-note#9113
  📱 fix siyuan-note#9127
  📱  fix siyuan-note#9111
  📱  fix siyuan-note#9111
  🚨
  ⚡ Improve block loading performance on Windows/Linux/macOS amd64 arch siyuan-note#9084
  🎨 Update text
  ...
@pisceswb
Copy link
Author

pisceswb commented Sep 7, 2023

使用html格式写入剪切板,然后再粘贴入思源笔记,绕过了文件名过长的限制。

@pisceswb
Copy link
Author

pisceswb commented Sep 7, 2023

图片文件使用长文件名时,OCR不能作用于该图片,请问能解决吗?

@88250
Copy link
Member

88250 commented Sep 8, 2023 via email

@pisceswb
Copy link
Author

pisceswb commented Sep 8, 2023

谢谢D大,已解决问题。在使用html格式将图片写入剪切板时,将图片文件名缩短,只使图片标题过长,不影响OCR

@pisceswb
Copy link
Author

pisceswb commented Sep 8, 2023

建议将长文件名图片复制进思源笔记时,只将图片文件名截断到合适长度,而保留图片“提示文本”为原文件名

@88250
Copy link
Member

88250 commented Sep 8, 2023

这个尝试过,还搞不定。

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

No branches or pull requests

3 participants