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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:42:15+00:00 2026-05-27T01:42:15+00:00

<form action=http://s0.filesonic.com/abc method=post enctype=multipart/form-data> <input type=file name=files[] /> <button type=submit>submit</button> </form> The above code

  • 0
<form action="http://s0.filesonic.com/abc" method="post" enctype="multipart/form-data">
    <input type="file" name="files[]" />
    <button type="submit">submit</button>
</form>

The above code uploads the files to file sonic server, but I want to do this using programmatically using C#, basically my requirement is that the program creates the form and file control and sends the file to the Filesonic server URL mentioned in action attribute..

I have gone through many links but with no success, I have gone through the following links with no success.

Upload files with HTTPWebrequest (multipart/form-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-05-27T01:42:16+00:00Added an answer on May 27, 2026 at 1:42 am

    The following code will upload the file to the server as long as the server can accept it outside of files[] array.

    WebRequest webRequest = WebRequest.Create("http://s0.filesonic.com/abc");
    FileStream reader = new FileStream("file_to_upload", FileMode.Open);
    
    byte[] data = new byte[reader.Length];
    webRequest.Method = "POST";
    webRequest.ContentType = "multipart/form-data";
    webRequest.ContentLength = reader.Length;
    webRequest.AllowWriteStreamBuffering = "true";
    
    reader.Read(data, 0, reader.Length);
    
    using (var request = webRequest.GetRequestStream())
    {
        request.Write(data, 0, data.Length);
        using (var response = webRequest.GetResponse())
        {
            //Do something with response if needed
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am having an form for uploading an excel file like <form enctype=multipart/form-data action=http://localhost/joomla/Joomla_1.5.7/index.php?option=com_jumi&fileid=7
$('form').submit(function(){ this.action=http://www.sitename.com/post; return false; }); having altered the action attribute of the form ,i
My form action is set to a php file like this: <form name=addstudent action=includes/data.php?act=enquiry
Let say I have a post from like this: <form action=myApp/form_action.asp method=post> First name:
function simple_form($form_state) { $form['item'] = array('#type' => 'hidden', '#value' => 'some_value'); $form['#action'] = 'http://external-website.com/';
in the form action i have the following line\ <form action={URL} method=post target=_self id=xxx
Here it says the action attribute is required on form elements: http://www.w3schools.com/tags/att_form_action.asp but I
I am testing a form. It looks like: <form accept-charset=UTF-8 action=/the_action method=post> <select id=id
i have form action file in another directory but some file send to this
is it better to do this (regarding performance, not readability...): $('a.updateCartButton').click(function() { $('form[name=updateCartForm]').attr('action', $(this).attr('href')

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.