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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:23:59+00:00 2026-05-23T21:23:59+00:00

I have a flash app which sends raw data for a jpg image to

  • 0

I have a flash app which sends raw data for a jpg image to a particular url Send.aspx . In Send.aspx I am using request.binaryread() to get the total request length and then read in the data to a byte array.
Then I am writing the data as jpg file to the server. The code is given below:

FileStream f = File.Create(Server.MapPath("~") + "/plugins/handwrite/uploads/" + filename);
            byte[] data = Request.BinaryRead(Request.TotalBytes);

            f.Write(data, 0, data.Length);

            f.Close();

The file is getting created but there is no image in it. It always shows up as empty in any graphic viewer. What part am I missing. Am I supposed to use jpg encoding first before writing it to file? Thanks in advance

  • 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-23T21:23:59+00:00Added an answer on May 23, 2026 at 9:23 pm

    Well, you should use a using statement for your file stream, but other than that it looks okay to me.

    A few suggestions for how to proceed…

    Is it possible that the client isn’t providing the data properly? Perhaps it’s providing it as base64-encoded data?

    Have you already read some data from the request body? (That could mess things up.)

    I suggest you look closely at what you end up saving vs the original file:

    • Are they the same length? If not, which is longer?
    • If they’re the same length, do their MD5 sums match?
    • If you look at both within a binary file editor, do they match at all? Any obvious differences?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a flash app which will send/receive a constant stream of data. the
I've seen a few sites that have a flash app which takes video from
I have a Flash web app which displays user submitted PNG files. Files are
I have a flash app using the flex framework - I would like to
I have a problem with an J2ME client app, that sends data to an
I'm trying to build an app, which should have Flash Player control, which plays
I have a flash app (deployed as Air or regular app for iOS) which
I have a flash application that needs to send a http request to the
I have an android app which uses camera. I am using a socket connection
I have a facebook app, which works with fbjs/flash/python. From yesterday I have been

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.