I have a method like following:
#remember to validate the content type
i want to use it to upload the image file locally,but how do i make
sure that the uploaded file is image file?
if use the validate_format_of method,i wonder its ability,because any
file can pass its validate as long as the file is named like a
image,such as .jpg.
or use the file_field.content_type to manage the validate?If this
way,how to write the code?