-
Notifications
You must be signed in to change notification settings - Fork 44
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
Drag-and-dropping images from chromium-based browsers creates undeletable files #605
Comments
Issue appears to be a happening in a few places: Allusion/src/frontend/containers/Outliner/LocationsPanel/dnd.ts Lines 140 to 149 in 631cfb5
Apparently the "file.path" value in the file can be empty. If this is the case, the file should probably be skipped. Allusion/src/frontend/containers/Outliner/LocationsPanel/dnd.ts Lines 168 to 181 in 631cfb5
Then this section, we filter out URLs without image extensions and perform the check. However, our obtained URL from twitter comes in a different format: Allusion/src/frontend/containers/Outliner/LocationsPanel/dnd.ts Lines 101 to 109 in 631cfb5
Unfortunately, by the looks of things the blob returned has type Haven't gotten to the bottom of this yet, but it's a start. |
Incidentally, if we apply a 'naive' fix of removing the dot from else if (IMG_EXTENSIONS.some((ext) => item.toLowerCase().includes(`.${ext}`))) { Then the image gets pulled in as expected. However, I feel like this is not ideal. |
Describe the bug
Dragging and dropping an image from a chromium based browser (Tested on Brave and MS Edge) sometimes creates an undeletable file, created with a number in the following format: ' 1.' ,' 2.', '3.'
Directory listing:
Adding a new file and incrementing with each drag and drop.
When attempting to delete these files using file explorer, it claims the files cannot be found (even though it is still displaying them. Likely because of it's abnormal naming scheme (no extension after the period).
Files must be deleted using the command line.
Firefox does not seem to produce this behavior, and dragging and dropping works as expected.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The image that was dragged and dropped should be added to the folder.
Screenshots
Allusion version
Desktop OS
The text was updated successfully, but these errors were encountered: