Copied to clipboard

Flag this post as spam?

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


  • Per Jensen 4 posts 74 karma points
    Feb 01, 2017 @ 08:13
    Per Jensen
    0

    File type is not allowed here

    Im trying to run a Umbraco with SSL, but when i do I cant upload images / files in the Media section for some reason.

    I added this to the web.config to force SSL :

       <rule name="Redirect to HTTPS" stopProcessing="true">
          <match url="(.*)" />
          <conditions>
          <add input="{HTTPS}" pattern="^OFF$" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
        </rule>
    

    And set

    <add key="umbracoUseSSL" value="true" />
    

    When i try to upload a file in the Media section, I get the error : File type is not allowed here

    Tryed to inclue this rule into the web.config also

    <location path="umbraco">
        <system.webServer>
          <urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" />
          <rewrite>
            <rules>
              <clear />
            </rules>
          </rewrite>
        </system.webServer>
      </location>
    

    To see if i could get it to ignore ssl in the backend, but it still fails.

    Anybody have any ideas ?

  • David Peck 690 posts 1896 karma points c-trib
    Feb 01, 2017 @ 09:29
    David Peck
    0

    I don't know the cause, but on your clearing of rules of the umbraco path, does that work? I've always added a condition to my rules like this one

              <rule name="LowerCase" stopProcessing="true">
                <match url="[A-Z]" ignoreCase="false" />
                <conditions>
                  <add input="{REQUEST_URI}" pattern="^/assets/" negate="true" />
                  <add input="{REQUEST_URI}" pattern="^/media/" negate="true" />
                  <add input="{REQUEST_URI}" pattern="^/umbraco/" negate="true" />
                  <add input="{REQUEST_URI}" pattern="^/umbraco_client/" negate="true" />
                  <add input="{REQUEST_URI}" pattern="^/install/" negate="true" />
                </conditions>
                <action type="Redirect" url="{ToLower:{URL}}" />
              </rule>
    
  • Per Jensen 4 posts 74 karma points
    Feb 02, 2017 @ 08:18
    Per Jensen
    0

    Hi David

    It seems to work yea.

    Ones i started my solution in another browser, or incognito mode, it worked.

    My problem was that it seems that Chrome cached a script of some sort, that contains a string of file types that are allowed. This string was empty, so no files was allowed.

    Ones i got my cache fully cleared it worked :)

    Thx for your response anyway, and I might try your conditions for a rule at some point.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies