nextcloud / nextcloud/whiteboard

File incompatibility with excalidraw.com

Open
#938 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
215
Forks
39
Avg merge
1d 3h
Merged PRs (30d)
32

Description

Steps to reproduce

  • Create a new drawing on excalidraw.com (or another excalidraw-based application)
  • Upload the .excalidraw file to nextcloud
  • Open the file and save it
  • Download the changed file
  • Attempt to open the file via excalidraw.com
Error: invalid file

Why is this a problem

It sometimes makes sense to use Nextcloud to save excalidraw files wile editing them elsewhere (example obsidian, excalidraw.com, etc.)

Opening these files on the nextcloud web-ui, whether to edit them or by mistake, "corrupts" the file so it can no longer be opened elsewhere. This makes it impossible to use both to edit files depending on the situation, and makes it easy for users to break their drawings in a way that requires tinkering to fix.

Workaround and possible fix

A downloaded .excalidraw file can easily be fixed by prepending the following JSON values:

{
  "type": "excalidraw",
  "version": 2,
  "source": "https://<my-nextcloud-domain>",
}

Afterwards, both whiteboard and other tools can open the file again, unless it is saved by whiteboard and broken again.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the workflow using an .excalidraw file from excalidraw.com: upload it to Nextcloud, open and save it in the web UI, then download it. Trace how the file is serialized when saved and compare it with the format expected by excalidraw.com. Done means a file saved through Nextcloud opens again in excalidraw.com and other Excalidraw-based applications.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.