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

Web and WebWorks Development

Reply
New Contributor
sigi_sig
Posts: 3
Registered: ‎06-16-2012
My Device: Simulator
My Carrier: Digicel

Upload times out when upload a file a second time

When I try to upload a file it works the first time and then redirects me to another page when it is successful (Amazon S3 success_action_redirect). When I hit the back button and return to my form and upload another file it times out.

 

My form looks like this:

<form action="http://somebucket.s3.amazonaws.com/" method="post" enctype="multipart/form-data">
<input type="hidden" name="key" value="uploads/${filename}">
<input type="hidden" name="AWSAccessKeyId" value="<AWSAccessKeyId>">
<input type="hidden" name="acl" value="private">
<input type="hidden" name="success_action_status" value="200">
<input type="hidden" name="success_action_redirect" value="http://localhost/">
<input type="hidden" name="policy" value="<policy>">
<input type="hidden" name="signature" value="<signature>">
<input type="hidden" name="Content-Type" value="image/jpeg">
<!-- Include any additional input fields here -->

File to upload to S3:
<input name="file" type="file">
<br>
<input type="submit" value="Upload File to S3">
</form>

 

The above code works flawlessly in a browser its only on my 9930 sim that gives a problem. I am using phonegap.

 

 

Please use plain text.
BlackBerry Development Advisor (Retired)
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Upload times out when upload a file a second time

I think this could be a caching issue.  The form page may have stale data that Amazon's service is rejecting.  What type of error are you getting?

 

Are you using META cache tags on that page?

 

http://www.metatags.info/meta_http_equiv_cache_control

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
New Contributor
sigi_sig
Posts: 3
Registered: ‎06-16-2012
My Device: Simulator
My Carrier: Digicel

Re: Upload times out when upload a file a second time

Connection Timed out after ~ 12000 and an error 3 in phonegap which is Connection error. I'll update the my code with META tag and see how it goes.

Please use plain text.
New Contributor
sigi_sig
Posts: 3
Registered: ‎06-16-2012
My Device: Simulator
My Carrier: Digicel

Re: Upload times out when upload a file a second time

I added the meta tag and it still times out after ~ 12000. Also I tested the code on android and works well.
Please use plain text.
Developer
avinash_kumar_ispg_in
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve
My Carrier: compny

Re: Upload times out when upload a file a second time

hi 

<form enctype="multipart/form-data method="post">

 

is it works on os5 browserfield 

 

actually i am also using the same to post form data on another url it is working fine in os 6 but in os 5 i am getting error like this 8520browser.png

Please use plain text.