Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hassan 63 posts 237 karma points
    Mar 11, 2018 @ 08:37
    Hassan
    0

    Problem in upload EXE file in media section

    Hello.

    I use Umbraco 7.4.3. I uploaded an exe file in media section. The file work and run correctly before upload, but after upload it and download from umbraco website, it does not work!!

    What is the problem? Does Umbraco change file metadata after upload in media section?

    What can I do for solve it?

  • Søren Gregersen 288 posts 1150 karma points MVP c-trib
    Mar 11, 2018 @ 09:38
    Søren Gregersen
    0

    How does it “not work”?

    Normally files downloaded from the internet, are tagged as unsecure in Windows. That’s by design. You can change the property on the downloaded file, in the file properties, if what described above is the case.

    You can always read the code of how umbraco handles file-uploads.

  • Hassan 63 posts 237 karma points
    Mar 11, 2018 @ 10:15
    Hassan
    0

    Hi Søren.

    The file does not run after upload it in media section and download it. It has an error as "This app can not run on your PC. To find a version for your PC, check with the software publisher".

    The file runs correctly before upload, But does not run after upload it. Image of error: enter image description here

  • Asbjørn 74 posts 178 karma points c-trib
    Mar 11, 2018 @ 13:31
    Asbjørn
    0

    This sounds like you're missing an appropriate mime type configurations for .exe files. The web server doesn't know that to do with the file, so the download get corrupted.

    You should add something like this to web.config:

    <system.webServer>
    [..]
        <staticContent>
        [..]
        <remove fileExtension=".exe" />
        <mimeMap fileExtension=".exe" mimeType="application/octet-stream" />
        </staticContent>
        [...]
    </system.webServer>
    
Please Sign in or register to post replies

Write your reply to:

Draft