WordPress.org

Ready to get started?Download WordPress

Forums

Uploads by Proxy
[Addon] Uploads by proxy > 302 redirect instead of force download to local (2 posts)

  1. ramon fincken
    Member
    Posted 4 months ago #

    This plugin will download the files from production to staging. But what if a 302 redirect is fine?

    Try this addon (a few lines):
    Addon instructions

    http://wordpress.org/plugins/uploads-by-proxy/

  2. Paul Clark
    Member
    Plugin Author

    Posted 4 months ago #

    Thanks for your contribution! UBP is also on Github to discuss features (and pull requests!).

    Can you clarify your use case a bit for me? Your patch page says UBP "will fetch all files to your development uploads dir," but that is not the case. UBP only fetches images at the first time they are viewed on staging. So, even for sites with very large uploads directory, only a very small subset of images will be downloaded: those displayed on the home page, for example.

    The main reason I preferred download over a 302 redirect was for performance: when downloading, the plugin only runs once for each image (when it is not found). When running a redirect, the plugin (and all of WordPress!) is reloaded for every image. This can cause significant lag: images that would normally begin to load instantly must first take 1 to 2 seconds to reload WordPress + plugins before then redirecting (for every image, on every page load).

    Is there another case I'm missing that you feel a 302 better resolves?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.