Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Contributor
Posts: 31
Registered: ‎03-15-2013
My Device: 9320
My Carrier: Telkomsel
Accepted Solution

Blackberry - Problem Uploading File

i want to be able to upload files via BB java application

 

first attempt:

i create browserfield to call "upload.php" and send the file dirrectly from that page, but got the following error

 

[24941.271] VM:+GC(f)w=11
[24942.203] VM:-GCt=119,b=1,r=0,g=f,w=11,m=0
[24942.264] VM:QUOT t=8
[24942.264] VM:+CR
[24942.287] VM:-CR t=3
[24943.78] Bridge Type: 5 PID: 149 Exception loading URL: net.rim.device.internal.bridge.BridgeDatagramTooLa

rge[24943.78] Exception: Bridge Datagram size: 8295740 exceeds maximum: 1048576
[24943.78] AM: Exit net_rim_bb_browser_olympia_proxy(397)
[24943.78] Process net_rim_bb_browser_olympia_proxy(397) cleanup started
[24943.78] Bridge Type: 5 PID: 149 Java process cleanup run
[24943.787] VM:EVTOv=7680,w=201
[24943.787] Bridge Type: 5 PID: 149 disconnect
[24943.787] Bridge Type: 5 PID: 149 uninit
[24943.797] Bridge Type: 7 PID: 149 Java process cleanup run
[24943.805] Bridge Type: 7 PID: 149 disconnect
[24943.812] Bridge Type: 7 PID: 149 uninit
[24943.812] Bridge Type: 5 PID: 149 uninit

 

second attempt:

 

oh.. i thought i can solved this problem by creating an upload screen to read data from the file and send it to "upload.php" as a string type or whatever it called maybe binary data..

 

i followed instruction from the following thread

http://supportforums.blackberry.com/t5/Java-Development/Problem-How-to-upload-file-to-server/m-p/186... and.. many other thread

 

pro:

1. i can send textfile to the server with size < 100kb, it can be bigger maybe..

 

cons:

1. only works with "interface=wifi", other type like boolean deviceside is not working

2. when i tried to upload an image type "image/jpeg", the compiler return the following error

 

[9852.57] GS(createSurface): Temporarily promoting window size
[9852.585] VM:EVTOv=1,w=31
[9852.585] CMM: CreateFileApp(970) no sig from 0x424252
[9852.601] VM:EVTOv=1,w=31
[9852.617] VM:EVTOv=1,w=31
[9852.617] BRM:IDL+
[9852.625] BRMSmiley FrustratedR+
[9852.625] BRM:NMC:393216
[9852.625] BRM:JFR:92175860
[9852.671] VM:EVTOv=1,w=31
[9852.687] VM:EVTOv=1,w=31
[9852.703] VM:EVTOv=1,w=31
[9852.75] VM:EVTOv=1,w=31
[9852.75] BRMSmiley FrustratedR-
[9852.75] BRM:NMC:393216
[9852.75] BRM:JFR:92175860
[9852.75] BRM:IDL-
[9852.812] VM:EVTOv=1,w=31
[9853.0] -1
[9854.257] VM:RTMSh=134,o=0x34101C00,p=net_rim_bb_trust_application_manager
[9854.257] VMSmiley Very HappyPRMv=1
[9854.265] AM: Exit net_rim_bb_trust_application_manager(388)
[9854.304] VM:EVTOv=7680,w=194
[9854.312] Process net_rim_bb_trust_application_manager(388) cleanup started
[9854.312] Process net_rim_bb_trust_application_manager(388) cleanup done
[9864.101] Server Response : IMG-20130324-00241.jpg<br>0<br>error
[9866.492] JVM: bklt @9866492: timer
[9866.492] JVM: bklt[1] @9866492: usrIdle 14, usrTime 30, usrAct 1
[9866.492] JVM: bklt[1] @9866492: chkIdle 29, currTime 31
[9866.492] JVM: bklt @9866492: setTimer 16

then i feel like having a dead end in my path ..but what do facebook, twitter etc use to upload local file to their server ?

Highlighted
Contributor
Posts: 31
Registered: ‎03-15-2013
My Device: 9320
My Carrier: Telkomsel

Re: Blackberry - Problem Uploading File

split uploads into chunks