Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 活动存储-为特定型号指定磁盘_Ruby On Rails_Rails Activestorage - Fatal编程技术网

Ruby on rails 活动存储-为特定型号指定磁盘

Ruby on rails 活动存储-为特定型号指定磁盘,ruby-on-rails,rails-activestorage,Ruby On Rails,Rails Activestorage,我在rails 5.2应用程序中使用活动记录 在我的生产配置中,我将磁盘设置为:amazon,但是有些型号附带了我想存储在:local中的文件 有没有一种方法我可以在模型上的:has_attached:file处指定,我希望它存储在:local中,而不是:amazon?您可以探索并编写自己的包装器来实现这一点,因为似乎没有直接的方法。。

我在rails 5.2应用程序中使用活动记录

在我的生产配置中,我将磁盘设置为
:amazon
,但是有些型号附带了我想存储在
:local
中的文件

有没有一种方法我可以在模型上的
:has_attached:file
处指定,我希望它存储在
:local
中,而不是
:amazon

您可以探索并编写自己的包装器来实现这一点,因为似乎没有直接的方法。。