Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def randomize_file_name
- ext = Rack::Mime::MIME_TYPES.invert[image_content_type]
- self.image.instance_write(:file_name, "#{SecureRandom.uuid}#{ext}")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement