I am using Django to build an app where I ask the user to choose some files from his/her computer and the app will process them and write an output file in the same directory.
If I use the FileField model in Django, it uploads the file to the MEDIA_ROOT directory. That's not what I want. I would like the file to remain where it is and I need the path to the file where it is instead. I have been looking at the FileField code: https://docs.djangoproject.com/en/1.11/_modules/django/db/models/fields/files/#FieldFile
Does anyone know of a hack around this where the upload_to is disabled and the storage method that is being used returns the path instead? From what I could make out, the storage method reads the file and writes it into the upload_to directory. The FileField class uses the FieldFile class and the FileDescriptor class. Does anyone know which method actually performs the read and therefore has the actual path of the file? Been trying to read the code but I am not at an advanced stage yet and I can't understand all of it.
Thanks in advance.