Uploading a remote file url from Rails Console with Carrierwave

后端 未结 5 704
不思量自难忘°
不思量自难忘° 2020-12-25 10:46

I just wanted to know how one would go about uploading a remote file url using Carrierwave in the Rails console.

I tried the following without any luck. I presume it

5条回答
  •  无人及你
    2020-12-25 11:27

    I have had problems with remote_avatar_url not uploading the image or throwing any errors. For me, as far as I can tell, it was because I set the following in my model.

    attr_accessor :remote_avatar_url
    

    Carrierwave covers this for you, and although I don't understand why, setting it yourself buggers things up.

提交回复
热议问题