Paperclip "Data content type is not valid" 尝试上传图片后
Paperclip "Data content type is not valid" after trying upload image
这是我日志中出现的内容:
Parameters: {"upload"=>#<ActionDispatch::Http::UploadedFile:0x7e20e68
@tempfile=#<Tempfile:C:/Users/bi/AppData/Local/Temp/2/RackMultipart20180116-3004-iw0tdo.jpg>,
@original_filename="Inkedmdb atualizado_LI.jpg", @content_type="image/jpeg",
@headers="Content-Disposition: form-data; name=\"upload\";
filename=\"Inkedmdb atualizado_LI.jpg\"\r\nContent-Type: image/jpeg\r\n">,
"ckCsrfToken"=>"AR65EsJdr219Nu21oN1Vlw8fc8XAJTc5ZTIQ1lg9", "CKEditor"=>"pop_objective",
"CKEditorFuncNum"=>"1", "langCode"=>"pt-br"}
Command :: file -b --mime "C:/Users/bi/AppData/Local/Temp/2/43a60d0ece9425495f704619dc133c4f20180116-3004-bkzljx.jpg"
Command :: identify -format '%wx%h,%[exif:orientation]' "C:/Users/bi/AppData/Local/Temp/2/242e48571825b96df1752e5c3933b2fd20180116-3004-1n87xt.jpg[0]" 2>NUL
我在互联网上搜索了一下,他们建议我在初始化程序中创建一个新文件来覆盖我创建的方法欺骗或类似的东西,现在错误已更改,但仍然存在。
Data content type is not valid
有人有什么想法吗,为什么会这样?
我解决、清理并预编译了资产。
rails assets:clobber && rails assets:precompile
这是我日志中出现的内容:
Parameters: {"upload"=>#<ActionDispatch::Http::UploadedFile:0x7e20e68
@tempfile=#<Tempfile:C:/Users/bi/AppData/Local/Temp/2/RackMultipart20180116-3004-iw0tdo.jpg>,
@original_filename="Inkedmdb atualizado_LI.jpg", @content_type="image/jpeg",
@headers="Content-Disposition: form-data; name=\"upload\";
filename=\"Inkedmdb atualizado_LI.jpg\"\r\nContent-Type: image/jpeg\r\n">,
"ckCsrfToken"=>"AR65EsJdr219Nu21oN1Vlw8fc8XAJTc5ZTIQ1lg9", "CKEditor"=>"pop_objective",
"CKEditorFuncNum"=>"1", "langCode"=>"pt-br"}
Command :: file -b --mime "C:/Users/bi/AppData/Local/Temp/2/43a60d0ece9425495f704619dc133c4f20180116-3004-bkzljx.jpg"
Command :: identify -format '%wx%h,%[exif:orientation]' "C:/Users/bi/AppData/Local/Temp/2/242e48571825b96df1752e5c3933b2fd20180116-3004-1n87xt.jpg[0]" 2>NUL
我在互联网上搜索了一下,他们建议我在初始化程序中创建一个新文件来覆盖我创建的方法欺骗或类似的东西,现在错误已更改,但仍然存在。
Data content type is not valid
有人有什么想法吗,为什么会这样?
我解决、清理并预编译了资产。
rails assets:clobber && rails assets:precompile