Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rubyzip reseting file mime type headers #518

Open
6temes opened this issue Feb 1, 2022 · 3 comments
Open

Rubyzip reseting file mime type headers #518

6temes opened this issue Feb 1, 2022 · 3 comments
Assignees
Milestone

Comments

@6temes
Copy link

6temes commented Feb 1, 2022

Hi,

I am using Rubyzip to edit .docx files, and I realized that the file's Mime Type gets updated every time I open it.

Before:

$ file -I my_file.docx
my_file.docx: application/vnd.openxmlformats-officedocument.wordprocessingml.document; charset=binary

After:

Zip::File.open 'my_file.docx' do |zip|
  #  Even without doing anything.
end
$ file -I my_file.docx
my_file.docx:  application/octet-stream; charset=binary

Would there be any way to specify the mime type of the original file, or just keep it as it was?

@hainesr
Copy link
Member

hainesr commented Feb 1, 2022

Which version of rubyzip are you using?

@6temes
Copy link
Author

6temes commented Feb 1, 2022

Hi,

The last one 2.3.2

@hainesr hainesr added the bug label Feb 1, 2022
@hainesr hainesr self-assigned this Feb 1, 2022
@hainesr hainesr added this to the 3.0 milestone Feb 1, 2022
@hainesr
Copy link
Member

hainesr commented Feb 6, 2022

I can't reproduce this with 2.3.2 or HEAD. I am using Linux, which OS are you using?

@hainesr hainesr modified the milestones: 3.0, Future Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants