Upload file from Android programatically using php


Im trying to upload csv file saved in internal memory of my Android Phone, without using Select Or Import Options, i dont want to open File Storage and then select File manually, I want the App to upload CSV to MYSQL using PHP Automatically after pressing Upload Button
Thanks in Advance
Rama Krishna Thota

do you mean upload the csv file itself? or the content of the CSV?

Content of the CSV File, Actually manually if i select the file from my phone its updating MYSQL Database but i need to select the file using file selection from the phone, i want to update my database without selecting the csv file from phone, if i click on import button, it should collect the contents from my phone memory and should update my database.

so select the file and remember it's path in tinydb, next time no need to select again.

1 Like

isnt their any other way to add the path in the code itself...

what do you mean? you don'tknow the file path?

Without Selecting the file first time and remembering the path in tinydb, is their a way to add the path in the code itself...Please be patient and understand my query here..

Im unable to add the path in the code while capturing the file, Can you help me out with that code...in PHP

Hello rama krishna thota.

  1. Do you know the location of the CSV file? (If it belongs to your App, it should be in the ASD.)

  2. You can use the File Blocks to load the CSV content into your App programmatically (Button Click to start the process). PHP not required.

  3. Having loaded the CSV data, it can be used to update your SQL database.

There is a lot of information on the forum about handling databases. See this recent Topic for example:

(ignore the posts about Airtable)

Thank You Chris...