Closed (won't fix)
Project:
Stage File Proxy
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2015 at 09:52 UTC
Updated:
7 May 2016 at 08:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
thinkyhead commentedComment #3
thinkyhead commentedHere's an updated patch that cleans up the code a bit and also does an extra trick for those cases where links are hard-coded to /sites/my.remote.site/files instead of /sites/my.local.site/files. Currently stage_file_proxy only redirects files within the local files path, thus these paths need to have been generated programmatically on the staging site. However, many sites have many hard-coded paths in their node content, as generated by WYSIWYG image uploaders. These paths will not point to the local files folder path, but the remote files folder path, which may differ via the settings form. So, this patch also adds code to redirect files in the original (remote) path.
Comment #4
thinkyhead commentedThis patch further cleans up the code, and I've added a hook to fix paths as they are loaded from the "file" table as well, allowing cck filefield to be redirected.
Comment #5
thinkyhead commentedOops, a patch without a typo...
Comment #6
thinkyhead commentedThis patch adds some more code to additionally intercept the theming of imagefield_image, because that function calls field_file_urlencode_path which will prepend the local files path if the path doesn't contain it (as in the case of a different remote files path). Other modules that call field_file_urlencode_path have to be intercepted case-by-case, because there's no easy way to intercept field_file_urlencode_path.
Comment #7
thinkyhead commentedI keep finding more things needing a workaround in my setup. In this case I've added code so that swftools won't complain when a file doesn't exist locally. It simply sets the swftools_check_media setting to FALSE when stage_file_proxy is enabled. I thought of simply adding the following line to the init hook, but overriding options this way can be annoying to admins:
Comment #8
asrobI would close this issue because Drupal 6 reached EOL. See https://www.drupal.org/drupal-6-eol.