阅读背景:

验证远程映像实际上是ruby中的映像文件?

来源:互联网 

I'm trying to figure out how I can verify what I'm feeding into carrierwave is actually an image. The source I'm getting my image urls from isn't giving me back all live urls. Some of the images no longer exist. Unfortunately it doesn't really return the right status codes or anything because I was using some code to check if the remote file exists and it was passing that check. So now just to be on the safe side I'd like a way to verify i'm getting back a valid image file before I go ahead and download it. I'm trying to figure out how I can verify what




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: