Dim job_camera_1 As HttpJob
Dim linkdb As String
linkdb="https://korkmazlar.club/basari/upload_file.php"
Dim su As StringUtils
Dim out1 As OutputStream
out1.InitializeToBytesArray(100) 'size not really important
File.Copy2( File.OpenInput(File.DirDocuments,"aimg.jpg"), out1)
job_camera_1.PostString(linkdb, su.EncodeBase64(out1.ToBytesArray))
out1.Close
End Sub
Sub JobDone (Job As HttpJob)
'ToastMessageShow(Job.Success&"-"&Job.GetString&"-"&Job.JobName,True)
If Job.Success = False Then
Msgbox(Job.ErrorMessage,"error")
End If
Job.Release
End Sub
<?php
$base = file_get_contents("php://input");
$binary=base64_decode($base);
header('Content-Type: bitmap; charset=utf-8');
$file = fopen('resimler/test_image.jpg', 'wb');
fwrite($file, $binary);
fclose($file);
print json_encode('Image Upload Complete');
?>
and gives error
[12-Apr-2018 19:06:16 UTC] PHP Warning: fopen(images/test_image.jpg): failed to open stream: No such file or directory in /home/u7661540/public_html/basari/upload_file.php on line 5
[12-Apr-2018 19:06:16 UTC] PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/u7661540/public_html/basari/upload_file.php on line 6
[12-Apr-2018 19:06:16 UTC] PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /home/u7661540/public_html/basari/upload_file.php on line 7