drhs13583567608 2011-03-14 00:52
浏览 29
已采纳

Drupal 6将文件存储在非相对于安装路径位置并通过不同的子域进行访问

I've searched around about this, but I can't find a clean solution. I'd like to develop a module for Drupal 6 that will allow me to have the /sites/default/files directory configured so:

  • File uploads are uploaded to a folder on the server that IS NOT a path relative to the drupal install path
  • Links are accessed publicly via a different or sub-domain

I'm assuming I need to hook several File interface functions including file_directory_path and file_create_url, though I'm unsure of which functions to hook.

  • 写回答

1条回答 默认 最新

  • duancoubeng5909 2011-03-14 08:23
    关注

    It should be possible to use a absolute path (instead of the default relative one) in the file system settings at admin/settings/file-system.

    Displaying a different link might be more complicated, not sure how to do that in D6. I'd suggest having a look at http://drupal.org/project/cdn or a similar module to see what they're doing.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器