Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7088269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:46:46+00:00 2026-05-28T07:46:46+00:00

Tested on Android, Samsung Galaxy S, phonegap version: 1.3.0 I´m building a user based

  • 0

Tested on Android, Samsung Galaxy S, phonegap version: 1.3.0

I´m building a user based video uploader for a community.

All attempts using files less than 15 mb (roughly) works like a charm,
either if picking a file from the library or recording a video and
then uploading it.

I´ve tried this on two different servers with php ini settings well
above what is required.
I´ve tried chunkedMode = false;

Problem still remains, phonegap crashes if a video is larger than 15
mb. All files under 15 mb works really well.

Phonegap does not even return an error, it simply crashes.
I´ve tried putting in try catch statement without success.

Here is my code (very basic for testing purposes):

<!DOCTYPE html>
<html>
  <head>
    <title>Video Uploader</title>
    <meta name="viewport" content="width=device-width, initial-
scale=1">
    <link rel="stylesheet" href="master.css" type="text/css" />
    <script type="text/javascript" charset="utf-8"
src="phonegap-1.3.0.js"></script>
    <script type="text/javascript" charset="utf-8">
        function onLoad() {
        document.addEventListener("deviceready",onDeviceReady,false);
    }
        function onDeviceReady() {
                pictureSource=navigator.camera.PictureSourceType;
            destinationType=navigator.camera.DestinationType;
    }
    function uploadFile(mediaFile,method) {
                var ft = new FileTransfer(),
            path = mediaFile,
            name = "video.3gp";
        var options = new FileUploadOptions();
                options.chunkedMode = false;
                        options.fileKey = "file";
                        options.fileName = name;
                        options.mimeType = "video/mpeg";
        ft.upload(path,
            "http://www.myserver.com/upload.php",
            function(r) {
                        alert('Success ' + r.response);
            },
            function(error) {
                        alert('Error ' + path + ': ' + error.code);
            },
            options);
    }
    function onPhotoURISuccess(imageURI) {
                uploadFile(imageURI,"library");
    }
    function getVideo(source, type) {
            navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality:
50, destinationType: destinationType.FILE_URI, sourceType: source,
mediaType: type});
    }
    function onFail(message) {
        alert('Error');
    }
    </script>
  </head>
  <body onload="onLoad()">
        <button class="btn"
onclick="getVideo(pictureSource.PHOTOLIBRARY,Camera.MediaType.VIDEO);">Get
Video</button>
  </body>
</html>

Any advice on this will be much appreciated!

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:46:47+00:00Added an answer on May 28, 2026 at 7:46 am

    You need to set

    options.chunkedMode=true;
    

    When chunked mode is false the HTTP code on Android tries to buffer the entire transfer in memory before sending. With larger transfers 15 mb in your case but for other phones it will be even less as they will have less memory this will cause an OutOfMemory Exception to be thrown. Since an OOME should never be caught the application will crash.

    If you set chunked mode to true then the HTTP code on Android attempts to use streaming mode to send the info to the server. Not all servers support the streaming mode but most do.

    As to why it fails at 40+ mb I’m at a bit of a loss unless you php.ini file specifies this is the largest file size it will accept.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had tested my Android application in Samsung GT 15801 device using Eclipse. One
I am using Samsung Galaxy S 4G (the new one). Previously, I tested this
I can't make the following work on Android 3.1/Honeycomb (only Android version tested), but
I have recently purchased a Samsung Galaxy Tab as an Android 2.x testbed (I
Phonegap can watch location (W3C watchLocation) in the background on Android devices. I've tested
I'm using fragments in my Android application using the compatibility package. I have tested
The default Messaging app in Android (tested against version 2.1) appears to put the
I am having a problem with HDPI screens (tested on Samsung Galaxy S2). I
I have tested all my systems developed in Delphi (in Windows XP) on Wine
I have tested the below script on a demo page which is not using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.