Skip to content

fix: dropping pdf url to board#1157

Merged
kaamui merged 1 commit intoOpenBoard-org:devfrom
letsfindaway:fix-drop-pdf-url
Feb 11, 2025
Merged

fix: dropping pdf url to board#1157
kaamui merged 1 commit intoOpenBoard-org:devfrom
letsfindaway:fix-drop-pdf-url

Conversation

@letsfindaway
Copy link
Copy Markdown
Collaborator

This PR solves a problem when dropping a PDF url to the board. Expected behavior is that the same functions are executed as when dropping a PDF document to the board. Instead in most cases just nothing happens.

  • when dropping a url to the board, the data is downloaded and then processed in UBBoardController::downloadFinished
  • for a pdf, the data is written to a temporary file and then imported
  • before importing, the file must be closed to write pending data from buffers to disk
  • however the file was only closed after the import, so the data was not completely written to disk

- when dropping a url to the board, the data is downloaded and
  then processed in UBBoardController::downloadFinished
- for a pdf, the data is written to a temp file and then imported
- before importing, the file must be closed to write pending data
  from buffers to disk
@letsfindaway
Copy link
Copy Markdown
Collaborator Author

See also #1209 reporting another way to provoke this bug.

@kaamui kaamui merged commit 8b32718 into OpenBoard-org:dev Feb 11, 2025
@letsfindaway letsfindaway deleted the fix-drop-pdf-url branch February 12, 2025 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants