It is possible to know what type of data the user is uploading in my one field upload file in a django form, all this in order to do what gmail does. that puts the separated pdf the separated images.
It is possible to know what type of data the user is uploading in my one field upload file in a django form, all this in order to do what gmail does. that puts the separated pdf the separated images.
You should add some code to get the extension that the user upload something like this:
import os
nombre_documento, extension = os.path.splitext('midocumento.docx')
print nombre_documento
print extension
#output:
midocumento
.docx
This way you get the extension of your uploaded file, more information in the official documentation: splitext Python 2.xx documentation
splitext Python 3.xx documentation
I hope you feel lucky !!