I’ve seen posts of a few people who have this problem, but not a single response about solving it.
I can’t upload .png files, but .jpg and .gif work fine. When I upload just a .png, my action gets a StringIO object which breaks when I try to copy the upload to an absolute location. However, using multiple-field upload, as long as one of the to-upload files is not a .png, all of the png files will properly upload (TempFile objects now). So:
Upload: test_image.png --> Failure (FileUtils evaluating nil.to_str in #cp)
Upload: test_image1.png, test_image2.png --> Also fails
Upload: test_image1.png, test_image2.png, test_image3.jpg --> Works perfectly, I see all three images.
So, what’s going on with Rails and png? Is there a mime type I’m missing somewhere? It just doesn’t make any sense.