Android Question Postfile with httputils2 to web php service

junglejet

Active Member
Licensed User
Longtime User
I am having difficulties to get this done.
I am posting an existant file to a php script. I am surprised this works without a proper enctype, but it may be hidden somewhere. Anyway, Jobdone returns with no error.
The php script may not be right. Access rights are 777, and php.ini setting is file_upload on.
But no success.
Has anybody a serverside php script available that works with this code?
Thank you
Andy --

B4X:
job2.Initialize("upload", Me)
job2.PostFile("http://1111.111/upload/uploader.php",testdir,"diapa1.jpg")
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Without seeing any php-code we just can guess what the problem is. This example will work.
The php-file which is in use in this example can be found here.
 

Attachments

  • multipartpost_fileuploadwithphp.zip
    8.1 KB · Views: 380
Upvote 0

junglejet

Active Member
Licensed User
Longtime User
Thanks, it worked so far (files are uploaded), except for this small log line

<b>Fatal error</b>: Call to undefined function: json_encode() in <b>/mnt/xxxxxxxxxxxxx/htdocs/upload/multipartpost.php</b> on line <b>116</b><br />
 
Upvote 0
Top