0

I have a zipped file containing images which I am sending as response to a python REST API call. I want to create a rest application which consumes the python rest api in this manner: The response's content should be extracted without downloading (in browser side) and all the images should be displayed to the user. Is this possible? If yes, could you please help me in the implementation? I am unable to find help anywhere.

Gen123
  • 11
  • 1
  • Hi Gen123, this is possible and there are multiple ways to do so. What have you tried so far? – yichiz Jan 02 '21 at 20:06
  • Hi yichiz, how to read the utf 8 encoded string? Is there a way to do so without downloading it? I have only found examples of downloading the zip and then extracting and displaying. I need to skip download, and just extract and display, if possible? All this needs to be done in browser side. – Gen123 Jan 03 '21 at 05:42

1 Answers1

0

I think what you are trying to do is have a backend server (python) where zip files of images are hosted. You need to create an application (that could be in react) that

  1. Send HTTP calls to the server get those .zip files.
  2. Unzip them. How to unzip file on javascript
  3. Display the images to the user. https://medium.com/better-programming/how-to-display-images-in-react-dfe22a66d5e7

I'm not sure what utf-8 has to do with this, but this is possible. A quick google gave me the results above.

yichiz
  • 656
  • 4
  • 7