Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14097

Python. Unzip archive to which the filenames are encoded using urlencode, and because of the encoding, the length of some names is > 260

$
0
0

Creating a backend on FastApi. Post request, the bytes string is received. After that, I create a zip archive from this line. But the file names are encoded using url encoding.

data: bytes - bytes строка

with open("name.zip", 'wb') as f:f.write(data)

I will get these File names > 260 characters, which is why the archive is not unpackedFile names > 260 characters

I tried to look for bad names, decode them and replace them in a byte string with the correct ones.After that, the archive is destroyed.

As I know, you cannot change the names inside the archive.I can't figure out how to solve this problem.


Viewing all articles
Browse latest Browse all 14097

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>