Please update to B4A-Bridge v2.30+
Logger connected to: samsung SM-J710GN-358447073659196
--------- beginning of main
Copying updated assets files (1)
** Activity (main) Create, isFirst = true **
Error occurred on line: 36 (MultipartPost)
java.io.FileNotFoundException: /data/user/0/b4a.example.multipartpost/files/virtual_assets/snap1.png: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at java.io.FileInputStream.<init>(FileInputStream.java:76)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:199)
at b4a.example.multipartpost.multipartpost._createpostrequest(multipartpost.java:127)
at b4a.example.multipartpost.main._activity_create(main.java:455)
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:342)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at b4a.example.multipartpost.main.afterFirstLayout(main.java:102)
at b4a.example.multipartpost.main.access$000(main.java:17)
at b4a.example.multipartpost.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7230)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
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:438)
... 20 more
** Activity (main) Resume **
** Activity (main) Create, isFirst = true **
Have a look at this example it uses erels multipartpost.bas. It uploads two files to a phpscript. On phpside the uploads are written to uploads-folder
Edit 29. August 2015:
I´ve added a new version of the example. This example uses the new okHTTP-Library.
Please note that i need to change the module multipartpost.bas to be compatible with the new okHTTP
I not change anything to the code but i got the errors. can any1 help me? i stucked with this for days and need to get the code running urgently.