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

  1. ramon fincken
    Posted 2 years 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


  2. Paul Clark
    Plugin Author

    Posted 2 years 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?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.