International-Data-Spaces-Association / DataspaceConnectorUI

User interface for the Dataspace Connector.
Apache License 2.0
10 stars 14 forks source link

Zip file not dowloading correctly from REST source #274

Open jimazikerlan opened 2 years ago

jimazikerlan commented 2 years ago

Describe the bug I am trying to consume a resource that points to a REST API. The retrieved resource is a zip file which I am able to dowload through a get request in the navigator. When I consume the ZIP file through the connector I receive a file without extension and with incorrect encoding so I cannot unzip it. I think that it could be because the connector is returning text instead of the context of the HTTP response.

To Reproduce Steps to reproduce the behavior:

  1. Go to Data Consumption
  2. Click on IDS Resources
  3. Try to get the resource
  4. The resource downloads without extension and with wrong format when trying to unzip it.

Expected behavior Get a ZIP file

Desktop (please complete the following information):

tmberthold commented 2 years ago

Hello and thank you for the issue and sorry for the delay, I will forward this internally.

tmberthold commented 2 years ago

Did an initial analysis, seems to be an issue in file-type vs mime-type.

I have opened an issue in the UI repo with further info: https://github.com/International-Data-Spaces-Association/DataspaceConnectorUI/issues/214

jimazikerlan commented 2 years ago

Thank you very much!

SebastianOpriel commented 2 years ago

file-type vs. mime-type doesn't fix the issue completely. We reproduced the behavior with the UI and tried to reproduce it with the swagger ui. In latter case everything works fine. Thus, the issue might be related to the UI. Will move the issue to the ui repo