djplaner / word-to-canvas-module

A userscript that will create a Canvas Module (including all module items) from a Word document (using special styles)
https://djplaner.github.io/word-to-canvas-module/
MIT License
0 stars 0 forks source link

Canvas API apparently doesn't like big images #28

Open djplaner opened 2 years ago

djplaner commented 2 years ago

Word docx appears to bork at big images (e.g. first learning module from 1499EDN).

They just disappear -- when converted to HTML this is working, but when added to Canvas, it disappears

Cause is due to Canvas RCE deleteing base64 content

Solution

djplaner commented 2 years ago

Converting base64 images into files saved on Canvas files area

Keep Mammoth base64 images as is in WordConverter. Creating the module would need to

The image URL is the full file url with "/preview" on the end

djplaner commented 2 years ago

Uploading a file via Canvas API

ufcopen/canvasapi

This works fine it's process is

djplaner commented 2 years ago

Implement trial run