Creating a zip file in stream without directory structure
I’m working on a Flask app to return a zip file to a user of a directory (a bunch of photos) but I don’t want to include my server directory structure in the returned zip. Currently, I have this : def return_zip(): dir_to_send = ‘/dir/to/the/files’ base_path = pathlib.Path(dir_to_send) data = io.BytesIO() with zipfile.ZipFile(data, mode=’w’) as… Read More Creating a zip file in stream without directory structure