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

  • Home
  • SEARCH
  • 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 7763157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:35:41+00:00 2026-06-01T14:35:41+00:00

I want to go to select a file from sdcard and upload it to

  • 0

I want to go to select a file from sdcard and upload it to server. is it possible to access the sdcard in android via phonegap as how we are picking a image from gallery and uploading. I went through samples but all are specifying the file name also like eg: mnt/sdcard/read.txt. But i want to goto only sdcard so that user can select his own file is it possible to do.

  • 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-06-01T14:35:42+00:00Added an answer on June 1, 2026 at 2:35 pm
    U can easily do that its very easy
    
        window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccessUpload, fail);
    
        function onFileSystemSuccessUpload(fileSystem) {
         // get directory entry through root and access all the folders
                 var directoryReader = fileSystem.root.createReader();
    
        // Get a list of all the entries in the directory
        directoryReader.readEntries(successReader,fail); 
    
              }
    
          function successReader(entries) {
            var i;
            for (i=0; i<entries.length; i++) {
               //alert(entries[i].name);
               if(entries[i].isDirectory==true)
               {
                 var directoryReaderIn = entries[i].createReader();
                directoryReaderIn.readEntries(successReader,fail); 
    
               }
    
                if(entries[i].isFile==true)
                 {
              entries[i].file(uploadFile, fail);
               }
            }
        }; 
    
     function uploadFile(file) {
    var target=""; //the url to upload on server
         var ft = new FileTransfer(),path = "file://"+ file.fullPath,name = file.name;
                    ft.upload(path, target, win, fail, { fileName: name });
                   // var ft = new FileTransfer();
                  //ft.upload(file.fullPath, target, win, fail, options);
    
    
                function win(r) {
                    alert("Code = " + r.responseCode);
                   alert("Response = " + r.response);
                    alert("Sent = " + r.bytesSent);
                }
    
                function fail(error) {
                    alert("An error has occurred: Code = " + error.code);
                }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to develope upload and download file from server. Upload.html <form action=/UploadFile/UploadFile method=POST
I want to upload a file which is stored in sdcard to php server.To
I want the user to select a file from an iPhone and upload to
I want to upload .mp3 file(only) from device to my server. I want to
I want to enable the user to select a video file from the on-device
I have Uitable with data read from a AScii file. I want to select
//below In my application i have a button select image from sdcard and on
I want to create one application which send email with attachment(select file from SD
I want to pick an image from gallery and then get the path of
I want to export select * from table results to a text file from

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.