Is it possible to upload a video via subdomain?

edited August 2015 in Customizations
As the title suggests I am wondering if there is some code somewhere (fileupload.js? videos_add.php?) I can edit so that the video upload initiates through "direct.example.com" rather than "example.com" so that I can avoid CloudFlare's file size upload limit?

example.com - uses cloudflare caching.
direct.example.com - DNS points to the same place but bypasses CloudFlare's server completely.

How easy would it be to achieve this? (If at all.)

Comments

  • You can change the action param in upload form, which dictates where the video upload form posts to:

    /cc-content/themes/default/account/upload_video.phtml (Approx. Line 19)
    /cc-content/themes/mobile-default/account/upload.phtml (Approx. Line 15)

    Replace HOST which evaluates to example.com to direct.example.com. This should give you what you want.

    However, since the file upload is an AJAX/POST, you might run into cross domain security issues on different browsers.
  • I couldn't get it to work so just decided to not use cloudflare in the end, thanks for the help though. :)
This discussion has been closed.