CarrierWave: Create the same, unique filename for all versioned files

后端 未结 3 1165
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-02 11:46

Before I go into detail I\'ll get right to the point: has anyone figured out a way to get Carrierwave to save files with their names as a timestamp or any arbitrary string that

3条回答
  •  南方客
    南方客 (楼主)
    2021-02-02 12:13

    The solution is the same as described in the official documentation

    But it always returns original_filename as nil. So just change it to instance variable as @original_filename.present?

提交回复
热议问题