Forum: Ruby on Rails Validate file format: not by extension

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Brijesh S. (Guest)
on 2009-04-08 10:22
Hi All,

I want to validate a file format before uploaded on server.

I know it can be validate by content-type or using regex.
But I wonder if someone change the extension of file and then uploaded

I have to validate only two format: 1) wav 2) gsm

This topic is locked and can not be replied to.