Menu
Introduction
Getting Started
Release notes
Technical documentations
Version
Publication date

Nov 3, 2025

Confidentiality
Public
Reactions
0
Share

Repair images of Space-migrated project notes

TASK
2 times
100 %
22 seconds
Typing name :  TASK.gws_project.MigrateNoteImagesFromSpace Brick :  gws_project

One-off fix: download the embedded images of notes migrated from Space

One-off, idempotent repair of the images embedded in notes migrated out of Space.

The main Space removal migration (MigrateProjectDataFromSpace) was run before project notes supported images. It converted each Space Constellab document into a local rich-text NOTE, copying the content verbatim — so the figure references (their filenames) were kept, but the image bytes were never downloaded into the note's local directory. As a result the images of those migrated notes are broken.

For every NOTE that was migrated from Space (i.e. has a space_document_id), this task:

  • reads the note's rich-text content and finds its FIGURE blocks,
  • for each figure whose image file is missing on disk, downloads the bytes from Space and writes them under the note's dedicated directory, keeping the same filename so the content is left untouched.

The task is idempotent: a figure whose file already exists locally is skipped, so re-running only fetches what is still missing (and a note whose images are all present is a no-op). It never writes to Space and never mutates the note content. Per-figure and per-note errors are reported and never abort the run.

Config:

  • dry_run (default True): only report which figures would be downloaded, without fetching or writing anything. Run once with dry_run=True, review the report, then re-run with dry_run=False.

Output: a JSON report with per-note counts and details (figures repaired, already present, errors, failed notes).

Output

Repair report
Resource that holds a JSON dict

Configuration

dry_run

Optional

Only report what would be repaired, without writing anything

Type : boolDefault value : true
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.