By V I R U S on
Hello!
I'm looking for a good solution how to change the output file location. By default all file paths in Drupad lead to /sites/sitename.com/files/.. but i'm trying to change that so that all paths will be changed to links to static domain like http://static.sitename.com.
Is it possible to do that within a Drupal Theme?
Thanks!
Comments
Sorry for bumping, but still
Sorry for bumping, but still no solution found.
.
File/image upload fields, or WYSIWYG editor uploads (like FCK Editor or Tiny MCE, or the IMCE module)?
No, that's not what i mean.
No, that's not what i mean.
.
You mean for stuff like the favicon and such then?
Currently for stuff located
Currently for stuff located in /sites/mypage.com/files/
.
That is the folder all those things I mentioned get uploaded to... Anyways, check yoursite.com/admin/settings/file-system out. You should be able to configure it there. I think it'll have to be in the same domain as the site is, so setting a subdomain might not work. I can't guarantee whether it really won't work, though, so it's worth just giving it a try. Keep in mind that changing that path can create a mess (as the warning on admin/settings/file-system says, too), regardless of it going to the same domain or to a subdomain.
Hmmm... Houston, we have a
Hmmm... Houston, we have a problem =))
I know what you mean, but what i mean other thing. I have nothing about that all files are uploaded to /sites/mysite.com/files.
My thing is, that i will create a subdomain like static.mysite.com which will point to /sites/mysite.com/files and then change all links which appears in HTML from /sites/mysite.com/files/.../filename.gif to http://static.mysite.com/.../filename.gif.
The question is, how should i replace all that links?
.
Ohhhhhh, you want to know if you have to transfer those when you got a multisite setup. Nah, Drupal gets all it needs for each site in a multisite setup from the sites/[site name] folder. So if you keep the files in that files folder, things'll be just fine.
So basically, just set up the subdomain, link it to that mysite.com in the sites folder and Drupal will handle the files folder.
Please read my post again.
Please read my post again.
.
Oh, sorry. Didn't see that last line. Use the global var $base_url instead of the domain part. So it'll be like this:
And now I hope I understood your question right for a change :P
That will affect the drupal
That will affect the drupal Complete, not only the files.
.
How do you mean?
You simply don't get what i
You simply don't get what i need =)
.
Yeah, I guess so. As far as I understand, this is the whole issue:
Situation- You got a theme that's currently running on mysite.com
- That theme uses files from sites/mysite.com/files
- To use those files, a link to them is placed in the theme
TaskWhat you now want to do, is use that theme in a subdomain (static.mysite.com) and want the theme to still use the files in sites/mysite.com/files
Is this correct?
No, i don't want to use that
No, i don't want to use that theme in a subdomain. I want to use it on a real domain and fetch files from subdomain.
.
So you got files in static.mysite.com/files and you want to use them in mysite.com/files?
Yeah, something like that.
Yeah, something like that. I've explained that already in the first post. No need to repeat it twice.
.
Yeah, check my answer to that. No need to repeat that twice either :P
Sorry, but all what you wrote
Sorry, but all what you wrote is a total miss. Nothing what could help to solve the problem.