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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:17:09+00:00 2026-05-10T18:17:09+00:00

I have an API consisting of ASP.NET webservices callable through GET/POST/SOAP. A new functionality

  • 0

I have an API consisting of ASP.NET webservices callable through GET/POST/SOAP.

A new functionality will require me to accept files through this webservice. Basically I’m allowing users to upload files to a file archive through the API, which they’d otherwise do by logging into our browser based administration system.

The API needs to be as easily consumed as possible. I’m thinking of dropping SOAP support since our PHP clients mainly use the GET/POST methods, and the .NET clients don’t mind either way. With that as a prerequisite, I’m thinking of simply creating an UploadFile(fileName) method, and the requiring the user to send the file through POST as a normal file upload.

However, I will not be able to specify the file field as a parameter to the method, right? So if I simply state in the documentation ‘file should be sent in POST field called ‘File”, would that pose any problems when I need to read the file?

All files are in binary format, PDF’s, various image formats, FLV and so forth. Also, file sizes will mainly be in the 2-20MB vicinity, but given the above solution, would I have any troubles accepting files in the 250MB area?

Receiving a file this way would result in the file being loaded completely into memory, before I write it to disk – is there any way around this, besides letting the service receive a Stream and thus disabling me from accepting other parameters, and hindering the easy usage of the service?


Besides what’s possible on my side, I’m also curious in regards to how I make it as easy as possible for the callees to send the file. I’m guessing POST is one of the most accessible ways of receiving the file, but if anyone has any comments, I’d like to hear them as well.

  • 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. 2026-05-10T18:17:10+00:00Added an answer on May 10, 2026 at 6:17 pm

    However, I will not be able to specify the file field as a parameter to the method, right? So if I simply state in the documentation ‘file should be sent in POST field called ‘File”, would that pose any problems when I need to read the file?

    There’s no reason you can’t include additional POST (or GET, for that matter) parameters. I would probably take the filename as an additional POST parameter myself, so that clients that automatically use the local filename in the request can rename easily. If I expected naming conflicts, I may even return a server chosen name in the event of conflicts…I think the REST folks use some sort of HTTP Created status code for that.

    All files are in binary format, PDF’s, various image formats, FLV and so forth. Also, file sizes will mainly be in the 2-20MB vicinity, but given the above solution, would I have any troubles accepting files in the 250MB area?

    You’ll need to tweak the maxRequestLengths and executionTimeouts in web.config. And, if anyone tries a 250MB upload over dialup – well, let’s just say it probably won’t work.

    Receiving a file this way would result in the file being loaded completely into memory, before I write it to disk – is there any way around this, besides letting the service receive a Stream and thus disabling me from accepting other parameters, and hindering the easy usage of the service?

    ASP.NET 2.0+ spools uploaded files to disk as they come in, to avoid preloading the entire request into RAM. Tweak web.config’s requestLengthDiskThreshold as appropriate to balance speed and memory usage. You couldn’t take a Stream if you wanted to…though you may be able to take in a byte[] array. I’m really not sure what that’d mean though….

    For small files, you could do base 64 which should be trivial for clients. But, for 20MB – the overhead wouldn’t be worth it.

    There’s a bunch of different ASP.NET file upload components – which basically hook up to Begin_Request as an HttpModule, and intercept the request stream for any multippart/form-uploads. With ASP.NET 2.0, this is probably unnecessary, unless you want to provide some sort of progress callback or something. If that’s the case – the mechanics of them should work with a web service the same.

    RFC 1867 is the relevant spec, but this upload component does a good job of laying out what the request looks like if you’re intent on parsing your own.

    The one question mark I would have, is what the level of support for multipart/form-data in the http libraries of your clients is. I’d suspect that it’s pretty good all around, but you may want to check.

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

Sidebar

Ask A Question

Stats

  • Questions 67k
  • Answers 67k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer It's really not clear what you mean I'm afraid, but… May 11, 2026 at 12:02 pm
  • added an answer This is really late, but here's how you can find… May 11, 2026 at 12:02 pm
  • added an answer You can do client-side filtering if you wish but you… May 11, 2026 at 12:02 pm

Related Questions

I have an API consisting of ASP.NET webservices callable through GET/POST/SOAP. A new functionality
I have an API that is dependent on certain state information between requests. As
I have an API call in my application where I am checking the time
So, I have an API that I need to implement in to an existing
I have an app using PHP and the PayPal API. The basic way it
I have this jQuery code that queries an API on a keyup event (via
I have a bit of a problem. I wrote an API a long time
I have this function: RegisterGlobalHotKey(Keys.F6, MOD_SHIFT | MOD_CONTROL); which call an API to register
I am having some trouble with the Google Maps API . I have an
I have a need to create a transactional process using an external API that

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.