Android Studio - How to select a file (PDF) and send it via HTTP request? + how to download it from Django backend
In my Java Android Studio app I want to let the user choose a PDF file that will be sent via an HTTP POST request to my local backend made in Django which saves the PDf file received to an postgreSQL database as a bytea data type. My backend should be ready to handle these requests, so I only need help with the Java Android Studio frontend.
Many solutions that I found online used no longer supported functions, so I want to specify that the app is for Android 10 and higher
I would also like to know how can I download these uploaded files from the database on back to my mobile device with a GET HTTP request.
If you want to see some sections of my code just let me know.