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 928813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:04:17+00:00 2026-05-15T20:04:17+00:00

I am using following tutorial to upload image file to webserver. and getting file

  • 0

I am using following tutorial to upload image file to webserver.

and getting file not found exception here.

try {
         File uploadFile = new File(uriString); 

// file path i receive **content:/media/external/images/media/2**

        FileInputStream fis =   this.openFileInput(uploadFile.getName()); // **ERRoR HERE**

        HttpFileUploader htfu = new HttpFileUploader("http://finditnear.sigmatec.com.pk/inbox/send_remote_reply","noparamshere", uploadFile.getName());
        htfu.doStart(fis);
        } 
    catch (FileNotFoundException e) {
        Toast.makeText(this, e.toString(), Toast.LENGTH_LONG).show();
        e.printStackTrace();
        return;
        }

image file exists there but still it giving me error.

Can any one guide me what is the solution?

  • 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-15T20:04:18+00:00Added an answer on May 15, 2026 at 8:04 pm

    content:/media/external/images/media/2 is incorrect file name, it’s a Uri.
    So this line

    FileInputStream fis =   this.openFileInput(uploadFile.getName());
    

    Should be replaced with

    InputStream fis=this.getContentResolver().openInputStream(new Uri(uriString));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

friends, i am trying to upload file to php server using following tutorial http://getablogger.blogspot.com/2008/01/android-how-to-post-file-to-php-server.html
I am using following a tutorial from here: http://www.shopdev.co.uk/blog/cookies-with-jquery-designing-collapsible-layouts/ This is the script I
I am following a VB tutorial to do some HTML manipulation using LINQ It
I am currently using the following command to upload my site content: scp -r
I have read the following tutorial Uploading Files To the Server Using PHP and
I'm trying to upload a file using JavaFX using the HttpRequest. For this purpose
I'm using the following tutorial http://developer.android.com/resources/tutorials/views/hello-mapview.html in order to create a map view and
I'm using the zend community server on windows vista. I'm following the tutorial in
I'm using Ubuntu 10, python 2.6.5 I'm following this tutorial: http://www.djangobook.com/en/2.0/chapter02 I followed all
I was following a tutorial I found on how to create a simple login

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.