[GH-ISSUE #1086] Dragging a folder onto a node leads to "Something wrong happened" #458

Open
opened 2026-03-03 00:21:19 +03:00 by kerem · 6 comments
Owner

Originally created by @i-am-the-slime on GitHub (Aug 11, 2021).
Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/1086

Issuehunt badges

Current behaviour

Error when dragging a folder onto a note:

image

Expected behaviour

Either fail gracefully, saying that dragging folders is not supported, but ideally zip the folder and and attach it.

Steps to reproduce

  1. Drag a folder onto a note

Environment

Latest macOS version.


IssueHunt Summary

Backers (Total: $20.00)

Become a backer now!

Or submit a pull request to get the deposits!

Tips

Originally created by @i-am-the-slime on GitHub (Aug 11, 2021). Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/1086 <!-- Issuehunt Badges --> [<img alt="Issuehunt badges" src="https://img.shields.io/badge/IssueHunt-%2420%20Funded-%2300A156.svg" />](https://issuehunt.io/r/BoostIO/BoostNote-App/issues/1086) <!-- /Issuehunt Badges --> # Current behaviour <!-- Let us know what is currently happening. Please include some **screenshots** with the **developer tools** open (console tab) when you report a bug. If your issue is regarding the old Boostnote, please open an issue in the old repo 👉 https://github.com/BoostIO/Boostnote/issues. --> Error when dragging a folder onto a note: <img width="200" alt="image" src="https://user-images.githubusercontent.com/1588055/128997479-df2c0c7c-420e-4eba-be81-03e533e1eec4.png"> # Expected behaviour <!-- Let us know what you think should happen! --> Either fail gracefully, saying that dragging folders is not supported, but ideally zip the folder and and attach it. # Steps to reproduce <!-- Please be thorough, issues we can reproduce are easier to fix! --> 1. Drag a folder onto a note # Environment Latest macOS version. <!-- Issuehunt content --> --- <details> <summary> <b>IssueHunt Summary</b> </summary> ### Backers (Total: $20.00) - [<img src='https://avatars3.githubusercontent.com/u/13612118?v=4' alt='boostio' width=24 height=24> boostio](https://issuehunt.io/u/boostio) ($20.00) #### [Become a backer now!](https://issuehunt.io/r/BoostIO/BoostNote-App/issues/1086) #### [Or submit a pull request to get the deposits!](https://issuehunt.io/r/BoostIO/BoostNote-App/issues/1086) ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/BoostIO/BoostNote-App/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds. </details> <!-- /Issuehunt content-->
Author
Owner

@Komediruzecki commented on GitHub (Aug 11, 2021):

Hi, i-am-the-slime,

can you please add more screenshots on how this happens,

Is this for boost note local space application or boost note cloud spaces desktop application? Or is it for web application?

I cannot reproduce it in cloud desktop app nor local space desktop app.

In cloud I get 'Opps resource is already present', in local space desktop app I get no errors showing.

Can you also tell me in which view mode are you in?
image

See the image for modes.

<!-- gh-comment-id:896733191 --> @Komediruzecki commented on GitHub (Aug 11, 2021): Hi, i-am-the-slime, can you please add more screenshots on how this happens, Is this for boost note local space application or boost note cloud spaces desktop application? Or is it for web application? I cannot reproduce it in cloud desktop app nor local space desktop app. In cloud I get 'Opps resource is already present', in local space desktop app I get no errors showing. Can you also tell me in which view mode are you in? ![image](https://user-images.githubusercontent.com/18196945/129018494-a0bd3301-9544-497f-9403-569047e0afbe.png) See the image for modes.
Author
Owner

@Rokt33r commented on GitHub (Aug 19, 2021):

@Komediruzecki I think he was trying to drag and drop a folder from File manager app(Finder of macOS)

<!-- gh-comment-id:901636750 --> @Rokt33r commented on GitHub (Aug 19, 2021): @Komediruzecki I think he was trying to drag and drop a folder from File manager app(Finder of macOS)
Author
Owner

@Rokt33r commented on GitHub (Aug 19, 2021):

@i-am-the-slime
Zipping from the app is quite overkill for the web app since zipping from the frontend side should be really slow and unstable. But we can definitely improve our error message.

For anyone who wants to try to tackle this issue:

We should fix the error handler In cloud/components/molecules/Editor/index.tsx

        try {
          const { file: fileInfo } = await uploadFile(team, file, doc)
          const url = buildTeamFileUrl(team, fileInfo.name)
          if (file.type.match(/image\/.*/)) {
            return { type: 'img', url, alt: file.name }
          } else {
            return { type: 'file', url, title: file.name }
          }
        } catch (err) {
          pushApiErrorMessage(err) // This handler only understands errors from HTTP requests.  So we should check the type of the error and handle it differently so we can show proper error messages.
          return null
        }

https://github.com/BoostIO/BoostNote.next/blob/master/src/cloud/components/molecules/Editor/index.tsx#L424-L435

<!-- gh-comment-id:901646771 --> @Rokt33r commented on GitHub (Aug 19, 2021): @i-am-the-slime Zipping from the app is quite overkill for the web app since zipping from the frontend side should be really slow and unstable. But we can definitely improve our error message. ## For anyone who wants to try to tackle this issue: We should fix the error handler In `cloud/components/molecules/Editor/index.tsx` ```ts try { const { file: fileInfo } = await uploadFile(team, file, doc) const url = buildTeamFileUrl(team, fileInfo.name) if (file.type.match(/image\/.*/)) { return { type: 'img', url, alt: file.name } } else { return { type: 'file', url, title: file.name } } } catch (err) { pushApiErrorMessage(err) // This handler only understands errors from HTTP requests. So we should check the type of the error and handle it differently so we can show proper error messages. return null } ``` https://github.com/BoostIO/BoostNote.next/blob/master/src/cloud/components/molecules/Editor/index.tsx#L424-L435
Author
Owner

@i-am-the-slime commented on GitHub (Aug 19, 2021):

Yes this is dragging a folder from Finder to the Desktop app.

@Rokt33r This is on the Desktop app. I guess it's in Electron, but I don't think there should be a limitation on what processes you can call from within node. Also, there's this: https://github.com/bpajk/WasmZip .
Finally, I haven't tested this but I can't imagine zipping without compressing in JS to be that slow.

<!-- gh-comment-id:901667865 --> @i-am-the-slime commented on GitHub (Aug 19, 2021): Yes this is dragging a folder from Finder to the Desktop app. @Rokt33r This is on the Desktop app. I guess it's in Electron, but I don't think there should be a limitation on what processes you can call from within node. Also, there's this: https://github.com/bpajk/WasmZip . Finally, I haven't tested this but I can't imagine zipping without compressing in JS to be that slow.
Author
Owner

@Rokt33r commented on GitHub (Aug 20, 2021):

@i-am-the-slime We need some battle-tested modules which work perfectly on every OS and browser. I think it is too risky to introduce the zipping feature to our application.

<!-- gh-comment-id:902473615 --> @Rokt33r commented on GitHub (Aug 20, 2021): @i-am-the-slime We need some battle-tested modules which work perfectly on every OS and browser. I think it is too risky to introduce the zipping feature to our application.
Author
Owner

@issuehunt-oss[bot] commented on GitHub (Sep 14, 2021):

@boostio has funded $20.00 to this issue.


<!-- gh-comment-id:918959931 --> @issuehunt-oss[bot] commented on GitHub (Sep 14, 2021): [@boostio](https://issuehunt.io/u/boostio) has funded $20.00 to this issue. --- - Submit pull request via [IssueHunt](https://issuehunt.io/repos/74213528/issues/1086) to receive this reward. - Want to contribute? Chip in to this issue via [IssueHunt](https://issuehunt.io/repos/74213528/issues/1086). - Checkout the [IssueHunt Issue Explorer](https://issuehunt.io/issues) to see more funded issues. - Need help from developers? [Add your repository](https://issuehunt.io/r/new) on IssueHunt to raise funds.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/BoostNote-App#458
No description provided.