Hi, django uses upload handlers to manage uploaded files. In the default configuration, if the uploaded file is small, it is only stored in memory at that point. Therefore, the uploaded file object does not expose a temporary path as part of its public api. When using a FileField/ImageField as part of a model, the file is automatically written to a configurable location. If you don't need a model for your use case, you can simply save the file to a location you choose. Have a look at the handle_uploaded_file function at https://docs.djangoproject.com/en/dev/topics/http/file-uploads/
Cheers, Hendrik On 10/11/2012 11:57 PM, Jiao Li wrote: > Hi, I uploaded a file to the server. I want to extract the location of > the file at the server side. I use request.FILES['location'] to get my > file. When I print the request.FILE['location'], it just shows the file > name, not the path name. So how can I get the path of the file uploaded? > Thank you~~ > > -- > You received this message because you are subscribed to the Google > Groups "Django users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/FXwctBpp1kgJ. > 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/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django 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/django-users?hl=en.

