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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:44:09+00:00 2026-06-02T11:44:09+00:00

I looked through existing questions but could not find exact match. Maybe I’m missing

  • 0

I looked through existing questions but could not find exact match. Maybe I’m missing something obvious, if so – please direct me in the proper place. Here is my problem:

I have ExtJs front and application that needs to upload binary data to the WCF back end. On the front end I have the following code (I use Ext.form.field.File control to let user select a file)

// Create a dummy form in the controller after user selected a file
var form = Ext.create('Ext.form.Panel', {
  items: [ my_file_field ]
});

form.getForm().submit({
  method: 'POST',
  url: 'myservice.url',
  ...
});

On the backend I have the following contract:

namespace MyApp
{
    [ServiceContract]
    public interface ITransferService
    {
        [OperationContract]
        [WebInvoke(UriTemplate = "UploadImage", Method = "POST")]
        void SaveImage(Stream buffer);
    }

}

It works ‘fine’ except one little thing: in the stream inside SaveImage() I get not only binary data from the file user selected but also bunch of headers and encoded fields:

------WebKitFormBoundary26wAkvwGTnAMELFM
Content-Disposition: form-data; name="ext-gen1654"; filename="photo.png"
Content-Type: application/octet-stream
..... binary data goes here .... 
------WebKitFormBoundary26wAkvwGTnAMELFM--

What am I missing? How do I change the contract of the service so I get clean binary data?

  • 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-02T11:44:13+00:00Added an answer on June 2, 2026 at 11:44 am

    I found this post: http://antscode.blogspot.com/2009/11/parsing-multipart-form-data-in-wcf.html

    Does anybody know more simple solution? Not that proposed parsing logic is complicated, but I was under impression that this is a common task and there are should be easier way of doing it. I can’t believe MSFT doesn’t understand standard web pages POSTs in the WCF out-of-the-box…

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

Sidebar

Related Questions

I looked through the existing questions of this kind but didn't find what I
I've looked through many of the existing threads about this error, but still no
I looked through other questions and couldn't find what I needed. Best if I
I looked through other StackOverFlow questions, but I'm a little confused. I'm trying to
I have looked through all the OpenCV documentation that I could find and googled
I have looked through as many previous questions as possible but never saw a
I looked at all the similar questions and samples (there are many) but still
I have looked through lots of similar questions, and I have found out that
I've looked through the existing threads on IronPython and IDEs without finding an answer.
I looked through related questions before posting this and I couldn't modify any relevant

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.