Closed ullgren closed 5 years ago
Hi.
Sorry for late response. I was on vacations and just came back. I will take a look into this shortly.
Note to myself:
Windows sets application/x-zip-compressed
mime on type
property of a file when dropping a zip file.
This should be added to the list of zip mime types: https://github.com/advanced-rest-client/arc-data-import/blob/3.0.0-preview/arc-data-import.js#L425
Alternatively the script could read first few bytes and test for ZIP header however this would require reading a file twice in some situations.
Expected Behavior
Importing a RAML zip file downloaded from Exchange would be imported when dragged and dropped to the left pane of the "APIs" view. This works as expected when doing the same with the exact same ZIP file on Linux (Ubuntu 18.04)
Actual behavior
On Windows, when the file is dropped a toaster message showing the text "Unkown file format" appears. Nothing is imported.
To Reproduce
Screenshots
drag-n-drop-import-windows-10.zip
Additional Information
Importing the same API by using the "Explore" option works. However the real-world scenario is that we have a RAML in a private exchange on the EU Control Plane and we use federated users so we can unfortunately not use "Explore".