I have a custom file which is uploaded to my application, but I would
like to add some validation to this upload through paperclip.

I think I have followed the apprpropriate methods, but do not seem to
be making any progress.

The custom file I have is an xml file (in content) but has a unique
extension - e.g - examplefile.tcm

I have registered my Mime type in config\initializers\mime_types.rb as

Mime::Type.register "tcm", :tcm

and then in my model I have validated using:

 validates_attachment_content_type :tcm, :content_type => 'application/
tcm'

But the validation always throws up an error, despite uploading the
correct file?

I am obviously not registering the custom_type properly, but I am a
little stuck!

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to