Hi,
I'm Ian and newbie with B4A. I can send string to PC but I have a problem sending text file to PC (with B4J server).
I'm using a tablet with Android version 6.0.
java.io.FileNotFoundException: /data/user/0/b4a.example/files/temp.text: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:487)
at java.io.FileInputStream.<init>(FileInputStream.java:76)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:209)
at anywheresoftware.b4a.samples.httputils2.httpjob._postfile(httpjob.java:235)
at b4a.example.cekorder._button4_click(cekorder.java:708)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:163)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:78)
at android.view.View.performClick(View.java:5265)
at android.view.View$PerformClick.run(View.java:21534)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5728)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:473)
mycode :
Dim Job As HttpJob
Job.Initialize("Job", Me)
Job.JobName = "Sent"
Job.PostFile(link2, File.DirRootExternal, "temp.text")
i'm sure that "temp.text" is exist cause i can open the "temp.text" with File.ReadString.
Any advice ?
Thanks a lot.
I'm Ian and newbie with B4A. I can send string to PC but I have a problem sending text file to PC (with B4J server).
I'm using a tablet with Android version 6.0.
java.io.FileNotFoundException: /data/user/0/b4a.example/files/temp.text: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:487)
at java.io.FileInputStream.<init>(FileInputStream.java:76)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:209)
at anywheresoftware.b4a.samples.httputils2.httpjob._postfile(httpjob.java:235)
at b4a.example.cekorder._button4_click(cekorder.java:708)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:163)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:78)
at android.view.View.performClick(View.java:5265)
at android.view.View$PerformClick.run(View.java:21534)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5728)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:473)
mycode :
Dim Job As HttpJob
Job.Initialize("Job", Me)
Job.JobName = "Sent"
Job.PostFile(link2, File.DirRootExternal, "temp.text")
i'm sure that "temp.text" is exist cause i can open the "temp.text" with File.ReadString.
Any advice ?
Thanks a lot.