BoostNote-App
BoostNote-App copied to clipboard
Dragging a folder onto a node leads to "Something wrong happened"
Current behaviour
Error when dragging a folder onto a note:
Expected behaviour
Either fail gracefully, saying that dragging folders is not supported, but ideally zip the folder and and attach it.
Steps to reproduce
- Drag a folder onto a note
Environment
Latest macOS version.
IssueHunt Summary
Backers (Total: $20.00)
boostio ($20.00)
Become a backer now!
Or submit a pull request to get the deposits!
Tips
- Checkout the Issuehunt explorer to discover more funded issues.
- Need some help from other developers? Add your repositories on IssueHunt to raise funds.
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?

See the image for modes.
@Komediruzecki I think he was trying to drag and drop a folder from File manager app(Finder of macOS)
@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
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.
@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.
@boostio has funded $20.00 to this issue.
- Submit pull request via IssueHunt to receive this reward.
- Want to contribute? Chip in to this issue via IssueHunt.
- Checkout the IssueHunt Issue Explorer to see more funded issues.
- Need help from developers? Add your repository on IssueHunt to raise funds.