Open JannikStreek opened 2 months ago
So the reason why Safari adds .txt at the end is that the image exported is actually 0KB. Chrome downloads it correctly, but it still doesn't show anything. Seems to be a general export bug.
Can be reproduced on Desktop as well.
This is caused by canvas.toDataUrl()
in the export handler: https://github.com/b310-digital/teammapper/blob/main/teammapper-frontend/mmp/src/map/handlers/export.ts#L86
I'm assuming there's a practical character limit to the base64 string and we're just exceeding it.
We're hitting the practical limits of canvasses when exporting images:
Maximum height/width: 32,767 pixels Maximum area: 268,435,456 pixels (e.g., 16,384 x 16,384)
I think the only feasible solution would be to simply limit the working area to 16,000 x 16,000 px (leaving a bit of buffer) and displaying the rest of the area in grey.
Describe the bug When exporting a big map (meaning not many nodes but just nodes with huge distances), image download on the iPad adds a
txt
ending which makes image usage difficult.To Reproduce Steps to reproduce the behavior:
Expected behavior No txt ending of the file