In Rails, `ActionDispatch::Http::UploadedFile` has an accessor to access a `Tempfile` object. However, `Rack::Test::UploadedFile` does not provide that, but provinding the `#path` method instead. To be able to support both, we have to check for existance for `#tempfile` method, then fallback to `#path` method. Fixes #807
It's not working correctly as expected, so let's revert this for now. This reverts commit 51bb0f9.
Needs work for S3 Attachments.
…wrong, it will add an error if any of the allowed_types fails comparison with value, so it will pass only if value is either empty or equals to each and every one of allowed_types. Add test to check that validation passes if even one of content types match.