When using the upload module to upload a banner a absolute path to the image file is created. Is it possible to make this path relative to avoid problems moving from a testing server to a live server? If the banner is re-saved on the live server the path is updated, but this needs to be done for each banner.
Comments
Comment #1
sunPlease ensure that you have cleaned your site cache. Upload module stores file information in
files.filepathin your database. If you see absolute paths there you have to edit file settings in your site configuration (in /admin/settings) to use a relative file path for uploaded files (defaults tofiles).Please also remember that Banner module does not work with private file access yet. See corresponding issue.
Comment #2
smsearcy commentedI'm experiencing this same issue with uploaded images for banners. The files.filepath is correctly a relative path, but the in banner.cache the src attribute of the image tag specifies an absolute path to the image, including the domain name. The problem is that I'm editing my site on our internal network, but it's going to be accessed via a different name/IP from the outside world, so it would be useful if the image source did not include the name of the server.
Comment #3
mrf commentedSo it is safe to empty the banners cache when moving the site? I was hesitant to clear this, because it seemed to be the only place where the physical location of the image was referenced with-in the database. Additionally will this cache automatically clear if cron.php is run?
Comment #4
mrf commented