Is there a way to send a zip file by renaming the extension and the receiver changing the extension back?
from cheese_greater@lemmy.world to nostupidquestions@lemmy.ca on 26 Mar 18:22
https://lemmy.world/post/44780429

I need to send many documents and i have everything neatly in a folder directory structure that I would prefer stays intact but thr system wont accept zips

Can I rename the extension something I know is accepted and they can just change it back to zip? Its gonna take forever to do it the normal way by having to upload each individual document also without the folder structure context it will be a big mess

#nostupidquestions

threaded - newest

neidu3@sh.itjust.works on 26 Mar 18:31 next collapse

Should work, yes. A filename is independent of the file contents, and this includes the extension. You can rename it back and forth as much as you like.

Caveats, presuming you’resending via mail:

  • There could be a size limitation for attachments
  • There could be some sort of content scanning/verification at play

Alternatively, upload the file somewhere and send a link instead

cheese_greater@lemmy.world on 26 Mar 18:43 collapse

I just tried duplicating and renaming it then renaming it back and it seems to work, locally at least

paraplu@piefed.social on 26 Mar 19:02 next collapse

Yes the file extension isn’t part of the file itself. Changing the name isn’t destructive.

It’s mostly a hint to the operating system of what programs can interact with it, and sometimes to the programs how they should try to interact with it. Depending on the structure of the underlying file, a program may know what to do, or it might freak out, until you give it a reasonable extension.

hesh@quokk.au on 26 Mar 19:10 collapse

Renaming the extension back and forth should work fine. If the system you’re using just checks filename extensions that should solve your problem. However, it’s also likely that such a system would also check the file type (aka MIME type) by scanning the file contents, which just renaming the file would not fool, since it will still recognize it as a zip.

kn33@lemmy.world on 26 Mar 18:53 collapse

It depends. Some systems, that’ll work. In other systems, they look at the actual file content to see if the extension is lying.

paraplu@piefed.social on 26 Mar 19:04 collapse

It’s also worth noting if this is a work system you’re evading, some workplaces might take note and may not be too happy.