crawlee icon indicating copy to clipboard operation
crawlee copied to clipboard

Consider avoiding adding suffixes to files in MemoryStorageClient

Open janbuchar opened this issue 1 year ago • 9 comments

There is currently an automagic mechanism that stores binary files with a ".bin" extension and text files with a ".txt" extension. Is the comfort for Windows users worth the complexity?

janbuchar avatar Oct 14 '24 12:10 janbuchar

This surprised us in https://github.com/apify/crawlee-python/pull/572

janbuchar avatar Oct 14 '24 12:10 janbuchar

If memory serves me right I did this to make it similar to what the API does. That said my memory is rusty so take with a pinch of salt

vladfrangu avatar Oct 14 '24 12:10 vladfrangu

I also believe this is about behaving the same as the platform/API, and we surely want this to behave the same as the apify client.

B4nan avatar Oct 14 '24 12:10 B4nan

Could you elaborate what the API does? :slightly_smiling_face: I tried adding a key with no content type and it got stored just like that, no extension out of nowhere

janbuchar avatar Oct 14 '24 12:10 janbuchar

Can you check what the platform does when downloading such a file?

vladfrangu avatar Oct 14 '24 12:10 vladfrangu

If you mean this, image

it downloads the file with no suffix

janbuchar avatar Oct 14 '24 12:10 janbuchar

hmm, then it might've just been a port from old-but-still-alive local storage 😓

vladfrangu avatar Oct 14 '24 12:10 vladfrangu

Better to open this on slack, i am not opposed to changing this, but it would be great to first understand why it was like that (and I doubt anyone from our team will know).

B4nan avatar Oct 14 '24 13:10 B4nan

4 years ago 🥲 Google Chrome Beta - 2024-10-14 at 16 21 36@2x

vladfrangu avatar Oct 14 '24 13:10 vladfrangu