carrierwave upload Encoding::UndefinedConversionError: “\xFF” from ASCII-8BIT to UTF-8

后端 未结 2 1051
长情又很酷
长情又很酷 2021-01-12 03:03

Got this error on production but can\'t figure out where the problem is. Same request works fine on local development. But fail on production. I\'m building API for mobile c

2条回答
  •  旧巷少年郎
    2021-01-12 03:37

    Just adding if it can be of help to someone who is trying to find the solution to the error , while trying to write .jpg or any image files.

    "wb" instead of "w" in File.open(filename,'wb') has solved this issue for me.

提交回复
热议问题