D
D
Dmitry2016-11-25 17:12:57
Django
Dmitry, 2016-11-25 17:12:57

How to upload files from a mobile application to a site written in Django?

You need to upload files from the mobile application to the site. In other words, I need to develop an API for uploading files, users of mobile applications must be authorized and receive permissions, I'm interested in exactly the mechanism that needs to be developed on the Django side. I'm going to use Django-restframework, it has authorization to get a token. It is a little unclear how to implement user authentication from a mobile application and the download itself.
UPD: I mean how to implement this in Django, for example, write a Rest API with token authorization.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry, 2016-11-25
@dmtrrr

The htpp protocol works the same for all clients. What difference does it make who does the GET: the browser or the application?

A
asd111, 2016-11-25
@asd111

in a mobile application, you can use curl or a similar http library to make http requests like a regular browser does. tokens are usually passed as cookies in response to a request and these cookies will need to be stored and then sent from the mobile application with subsequent requests.

F
FeNUMe, 2016-11-25
@FeNUMe

If you are only going to use restframework to upload files, then this is an overkill - it's easier to use the standard dzhanga functionality . And the rest api should be used for more complex client-server interaction.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question