Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter BetaLeaf

    (@betaleaf)

    Another question for you. As my internet upload speed is slow, it takes time for the video to be uploaded to dropbox. Until the upload is complete, dropbox always responds error 404. IF THE CDN WAS WORKING PROPERLY FOR THE VIDEO, would it return a 404 error or try to load directly from the website?

    what I mean by this is if dropbox gives 404 at any time, and a user tries to access the video from my website, would it go ahead and load it from my site or would it only try to load from the cdn? (dropbox)

    Can this be configured to allow or deny? Sometimes I would want a video to load directly from my site and not over the cdn while it is still uploading since it would result in 404, but sometimes I would want it to not do that as it would kill my internet connection, using all my bandwidth.

    Some clarification would be awesome.

    Thanks and have a great day,
    Jeff Savage (BetaLeaf)
    https://www.betaleaf.net

    Thread Starter BetaLeaf

    (@betaleaf)

    Nevermind, I figured it out with a reverse proxy. Here is the rule I used.
    I had to do this on a per directory basis as trying to use this rule globally made any php page fail to load. This is fine since I normally have dedicated directories I use for all downloads.

    Below is an example. You will need to modify it for your needs. Place this rule in the web.config file that contains all your downloads. DO NOT PUT THIS IN ROOT web.config

    <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                        <match url="(.*)" />
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" />
                            <add input="{CACHE_URL}" pattern="^(https?)://" />
                        </conditions>
                        <action type="Redirect" url="{C:1}://<DomainofCDN><PathToDownloadsDirectory>{R:1}" redirectType="Found" />
                    </rule>

    And this is what it will look like when it is properly configured.

    <rule name="ReverseProxyInboundRule1" stopProcessing="true">
                        <match url="(.*)" />
                        <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" />
                            <add input="{CACHE_URL}" pattern="^(https?)://" />
                        </conditions>
                        <action type="Redirect" url="{C:1}://dl.dropboxusercontent.com/u/350004313/CDN/ShadowPlay/{R:1}" redirectType="Found" />
                    </rule>

    This Effectively redirects
    https://betaleaf.net/shadowplay/Team%20Fortress%202/Team%20Fortress%202%2012.27.2015%20-%2006.24.51.29.DVR.mp4
    to
    [video src="https://dl.dropboxusercontent.com/u/350004313/CDN/ShadowPlay/Team%20Fortress%202/Team%20Fortress%202%2012.27.2015%20-%2006.24.51.29.DVR.mp4" /]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unable to use CDN for my .mp4 and .exe files.’ is closed to new replies.