B4A device code -
Dim j As HttpJob
j.Initialize("fd", "AudioRecord")
Dim urlstr As String =$"${Main.MyWeb}/qldau?type=file&name=${mFileName}"$
Log($"Send URL = ${urlstr}"$)
j.PostFile(urlstr,"/storage/emulated/0/Download/", mFileName)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Log("result success ")
Main.GV.Put("okreply","OK")
CallSubDelayed(Main,"audio_sent")
End If
j.Release
Stopped = True
B4J - server code
Sub Handle(req As ServletRequest, resp As ServletResponse)
Main.filesFolder=File.Combine(File.DirApp, "www/audio")
If req.Method <> "POST" Then
resp.SendError(500, "method not supported.")
Return
End If
Log(req.Method)