drawio icon indicating copy to clipboard operation
drawio copied to clipboard

Saving browser-stored files to a device fails

Open FarSeeing opened this issue 2 years ago • 0 comments

Preflight Checklist

  • [x] I agree to follow the Code of Conduct that this project adheres to.
  • [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

If you are technical, you should reporting bugs along the lines of https://marker.io/blog/how-to-write-bug-report. If you are not technical, we will make allowances, please try to make an effort to understand the process.

Describe the bug TL;DR: when you have a browser-stored file and try to "save as" it to a local device with the use of native file dialog - the file doesn't get saved.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://app.diagrams.net/ with any browser that supports window.showSaveFilePicker (basically, not Firefox, not Safari)
  2. Click on "Decide later" image
  3. Save the file with "File - Save As..." as chose "Browser" image
  4. Now save the file again with the save "File - Save As..." but this time chose "Device" and select any filename/location you want image
  5. Try to open the file and see the error. Check the file in the file explorer and see that it's empty. Inspect the saved file and see that it's empty. That happens because the app in the success callback from the window.showSaveFilePicker updates the browser copy of the diagram, not the file one. image

Expected behavior Local file gets save properly,

Screenshots See ☝️

draw.io version (In the Help->About menu of the draw.io editor):

  • draw.io version x.y.z

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Browser Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below: yes

Additional context Add any other context about the problem here.

Expected behavior Local file gets save properly,

Screenshots See ☝️

draw.io version (In the Help->About menu of the draw.io editor):

  • draw.io 22.11.1

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Browser Version 120

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

FarSeeing avatar Dec 20 '23 14:12 FarSeeing