Android Code Snippet Upload a file to your server with HttpJob and php(included)

4-25-2020
Pick a SINGLE File from Dialog box, Then upload it To a server on LAN Or Internet
I wrote this B4A To be very small, simple, & easy to understand on a beginners level
In Files Is the PHP script To handle single File upload And save As original filename
php creates And appends a logfile: b4a.fileupload.log (I found this php on the internet somewhere)
Yes, I know about DirDefaultExternal :)
The LAN / Remote stuff, I had To Do For MY setup
Copy upit.php To your server
Then make a folder called uploads (make sure this folder writable)

My php.ini File settings: I like To upload very large files
Note: If you can't SAVE changes, set security To Everyone And allow everything
file_uploads = On (default anyways)
upload_max_filesize = 6000000M
post_max_size = 5000000M
max_execution_time = 6000
max_input_time = 6000

Hope this helps
-Scott McKay
 

Attachments

  • FileUpload.zip
    15.2 KB · Views: 755
Last edited:

Myr0n

Active Member
Licensed User
Longtime User
Then make a folder called uploads
To anyone make sure that the folder in your server with the name "uploads" has enough right to write the uploaded file.
 

DonManfred

Expert
Licensed User
Longtime User
php creates And appends a logfile: b4a.fileupload.log (I found this php on the internet somewhere)
Not somewhere. Here in the Forum ?

Maybe another Thread as it is a standard code i use in all of my php scripts. I have posted a few answers with this code.
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Dim fd As FileDialog

"fd" unrecognized at that script
1. You should NEVER poost to existing threads. It is a mistake.
2. You should always create a new thread for your questions.
3. Enter FileDialog in the site-search
4. The 1st link is a link to the documentation of FileDialog
clicking on that link brings you to
here you now know it belongs to DIALOGS library
 
Top