forked from tldraw/tldraw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix an issue with drag and dropping the files (tldraw#5013)
We got an error saying there was a bad request when drag and dropping files. This is because we wanted to create a file state as the file owner, but the file did not exist yet (which is not allowed, we only allow that for guest files). So we now also create a file together with the file state. ![image](https://github.com/user-attachments/assets/2bde9622-e511-4f84-ad08-b1d6dd54e3cc) I also noticed that the `createFile` function does not need to be async and also extracted document names from the files if we have them. ### Change type - [x] `bugfix` - [ ] `improvement` - [ ] `feature` - [ ] `api` - [ ] `other` ### Test plan 1. Drag some files to the sidebar. 2. They should correctly appear (with the correct names if they have time) and you should not see any rejected mutation toasts (like the one above).
- Loading branch information
1 parent
aa5aba3
commit 2d89d14
Showing
6 changed files
with
42 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters