0

I made an android application for sending files like .pdf .ppt .jpeg .png etc to php mysql server. I tried several 3rd party file picking libraries , but none worked in my android device (android q).

 Intent intent = new Intent();
            intent.setType("*/*");
            intent.setAction(Intent.ACTION_GET_CONTENT);
            startActivityForResult(Intent.createChooser(intent, "Please Select a file"), 1);

By this I can utmost get the file's content Uri but i am unable to use it to send it to server. Please help.

5
  • Well.. to send a file you dont need a file picker i would say. You need some upload code. Commented Apr 29, 2021 at 16:04
  • Further: a file is a file. If you can send one file you can send any file. Commented Apr 29, 2021 at 16:05
  • stackoverflow.com/a/56308643/115145 Commented Apr 29, 2021 at 16:08
  • Does this answer your question? Uploading file in php server from android device Commented Apr 29, 2021 at 20:19
  • No that is only for images. I am not getting the file path of other files by that method Commented Apr 30, 2021 at 13:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.