设置 ActiveStorage::Current.url_options 属性,磁盘服务使用该属性来生成 URL。在调用 ActiveStorage::Blob#url、ActiveStorage::Variant#url 或 ActiveStorage::Preview#url 的自定义控制器中包含此 concern,以便磁盘服务可以使用与当前请求相同的宿主、协议和端口生成 URL。
命名空间
    
  
  
  
  
    
    
    
    
    
    
    
    
  
设置 ActiveStorage::Current.url_options 属性,磁盘服务使用该属性来生成 URL。在调用 ActiveStorage::Blob#url、ActiveStorage::Variant#url 或 ActiveStorage::Preview#url 的自定义控制器中包含此 concern,以便磁盘服务可以使用与当前请求相同的宿主、协议和端口生成 URL。