-
Notifications
You must be signed in to change notification settings - Fork 21
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
Differece in MimeType detection #19
Comments
Try to increase buffer size(default 512). I think default size is too small for docx detection. |
Thank you . I'll try.
…On Fri, Nov 17, 2017 at 5:43 PM, red ***@***.***> wrote:
Try to increase buffer size(default 512). I think default size too small
for docx detection.
For example:
MimeGuesser.GuessFileType(ImageData, ImageData.Length);
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#19 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AdqK-RExj5WiaqUdlxt9Xk2be_N4eFxBks5s3amdgaJpZM4QiAfo>
.
|
Grate, it works. Thank you. |
@Kkomkov Now in 3.0 it default behavior. |
Grate.Thank you .
…On Thu, Dec 28, 2017 at 6:26 PM, red ***@***.***> wrote:
@Kkomkov <https://github.com/kkomkov> Now in 3.0 it default behavior.
You should use:
MimeGuesser.GuessFileType(ImageData);
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AdqK-U8ibb5T3aNKOWjUE8e4akHLJ2dmks5tE8E6gaJpZM4QiAfo>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is difference in MimeType detection for file and byte array for the same file
FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read);
byte[] ImageData = new byte[fs.Length];
fs.Read(ImageData, 0, System.Convert.ToInt32(fs.Length));
var res = MimeGuesser.GuessFileType(ImageData);
var res2 = MimeGuesser.GuessFileType(filePath);
check for *.docx files.
The text was updated successfully, but these errors were encountered: