Search Results

Search found 485 results on 20 pages for 'multipart'.

Page 1/20 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Node.js appears to be missing the multipart module

    - by Brenton Alker
    I am trying to parse form data, including upload files with a node.js http server. All of the tutorial type articles I have found use a require("multipart"); to include the multipart module, but when I try the same I get: Error: Cannot find module 'multipart' I also can't find it in the current api docs (though it is in the google cached version). So, has this module been removed from the standard installation or is there something else that does the job?

    Read the article

  • Only IE Browser gives org.springframework.web.multipart.MultipartException: The current request is not a multipart request

    - by Vicky
    I am trying to upload a file using jquery fileupload.js, spring. Code to upload files works fine for Mozilla and chrome browser. But getting following error *only for IE browser* org.springframework.web.multipart.MultipartException: The current request is not a multipart request. at org.springframework.web.method.annotation.RequestParamMethodArgumentResolver.assertIsMultipartRequest(RequestParamMethodArgumentResolver.java:183) at org.springframework.web.method.annotation.RequestParamMethodArgumentResolver.resolveName(RequestParamMethodArgumentResolver.java:149) at org.springframework.web.method.annotation.AbstractNamedValueMethodArgumentResolver.resolveArgument(AbstractNamedValueMethodArgumentResolver.java:82) at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:74)

    Read the article

  • java multipart POST library

    - by tom
    Is there a multipart POST library out there that achieve the same effect of doing a POST from a html form? for example - upload a file programmingly in Java versus upload the file using a html form. And on the server side, it just blindly expect the request from client side to be a multipart POST request and parse out the data as appropriate. Has anyone tried this? specifically, I am trying to see if I can simulate the following with Java The user creates a blob by submitting an HTML form that includes one or more file input fields. Your app sets blobstoreService.createUploadUrl() as the destination (action) of this form, passing the function a URL path of a handler in your app. When the user submits the form, the user's browser uploads the specified files directly to the Blobstore. The Blobstore rewrites the user's request and stores the uploaded file data, replacing the uploaded file data with one or more corresponding blob keys, then passes the rewritten request to the handler at the URL path you provided to blobstoreService.createUploadUrl(). This handler can do additional processing based on the blob key. Finally, the handler must return a headers-only, redirect response (301, 302, or 303), typically a browser redirect to another page indicating the status of the blob upload. Set blobstoreService.createUploadUrl as the form action, passing the application path to load when the POST of the form is completed. <body> <form action="<%= blobstoreService.createUploadUrl("/upload") %>" method="post" enctype="multipart/form-data"> <input type="file" name="myFile"> <input type="submit" value="Submit"> </form> </body> Note that this is how the upload form would look if it were created as a JSP. The form must include a file upload field, and the form's enctype must be set to multipart/form-data. When the user submits the form, the POST is handled by the Blobstore API, which creates the blob. The API also creates an info record for the blob and stores the record in the datastore, and passes the rewritten request to your app on the given path as a blob key.

    Read the article

  • Javamail read multipart emails

    - by Hectai
    Hey! My code is below, and the problem is that some of the emails i get from my POP3 account cannot be read, but with a simple unix email client it can be. It would be very helpful if you can find me what the problem is, or give me some advices. ps.: yes, i have read the tutorials already. String[] messageText = new String[500]; Store store = session.getStore("pop3"); store.connect(host, username, password); Folder inbox = store.getFolder("INBOX"); inbox.open(Folder.READ_ONLY); Message[] messages = inbox.getMessages(); for(int i = 0; i < inbox.getMessageCount() ; i++) { Message m = messages[i]; Object o = m.getContent(); if (o instanceof String) messageText[i] = (String)o; else if(o instanceof Multipart) { Multipart mp = (Multipart)o; int count = mp.getCount(); for(int j = 0; j < count; j++) { BodyPart b = mp.getBodyPart(j); String disposition = b.getDisposition(); if (disposition != null && disposition.equals(BodyPart.ATTACHMENT))) { DataHandler handler = b.getDataHandler(); messageText[i] += "file name : " + handler.getName(); } else { messageText[i] += b.getContent(); } } } } store.close(); } catch(Exception ex) { notif("Failure - " + ex.getMessage()); }

    Read the article

  • JAVA-how to manually compose a MIME multipart message

    - by Augusto Picciani
    I need to compose manually a MIME multipart message. I don't need to use any library to doing it. I'm trying this without success: out.println("From:myemail@mydomain"); out.flush(); out.println("To:myemail@mydomain"); out.flush(); out.println("Date:Thu, 25 Nov 2011 01:00:50 +0100"); out.flush(); out.println("Subject:manual test 269"); out.flush(); out.println("MIME-version:1.0"); out.flush(); out.print("Content-Type: multipart/mixed; boundary=\"1234567\"\n\n"); out.println("--1234567"); out.flush(); out.println("Content-Type: text/plain; charset:utf-8"); out.flush(); out.print("Content-Transfer-Encoding: 7bit\n\n"); out.flush(); out.print("test message\n\n"); out.flush(); out.println("--1234567"); out.flush(); out.println("Content-Type: text/html; charset:utf-8"); out.flush(); out.print("Content-Transfer-Encoding: 7bit\n\n"); out.flush(); out.print("<p><strong>test message in html</strong></p>\n\n"); out.flush(); out.println("--1234567--"); out.flush(); out.print("\r\n.\r\n"); out.flush(); Problem is that my mail client see the headers (from,subject,date,ecc.) but it doesn't see the message body. If i try without multipart it works fine. Maybe problem is in whitespaces character.

    Read the article

  • My multipart email script sends HTML messages just fine, but the plain text alternative doesn't not

    - by hsatterwhite
    I have a script set up to send out multipart emails; plain text and html messages. The HTML messages work just fine, but when I used an email client that only does plain text the plaint text message does not render and I get the following: -- This message was generated automatically by Me http://www.somewebsite.com/ $html_msg = $message_details; $plain_text_msg = strip_tags($message_details); $headers = <<<HEADERS From: Me <[email protected]> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="==PHP-alt$mime_boundary" HEADERS; // Use our boundary string to create plain text and HTML versions $message = <<<MESSAGE --==PHP-alt$mime_boundary Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit $plain_text_msg -- This message was generated automatically by Me http://www.somewebsite.com/ If you did not request this message, please notify [email protected] --==PHP-alt$mime_boundary Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit <html> <body> $html_msg <p> --<br /> This message was generated automatically as a demonstration on <a href="http://www.somewebsite.com/">Me</a> </p> <p> If you did not request this message, please notify <a href="mailto:[email protected]">[email protected]</a> </p> </body> </html> --==PHP-alt$mime_boundary-- MESSAGE;

    Read the article

  • [Python]Download an image embedded in a mime multipart message

    - by michele
    Hi, I have to download some images from links. This links return me a file where is embedded a multipart mime and a tiff image. I have writed this code but it downloads the file with mime. How I can remove the mime from this file and have the image returned? Can I do this with wget or curl? My code: def download(url,local): import urllib urllib.urlretrieve(url,local) urllib.urlcleanup() Thanks a lot.

    Read the article

  • Is there a lightweight multipart/form-data parser in C or C++?

    - by Hongli
    I'm looking at integrating multipart form-data parsing in a web server module so that I can relieve backend web applications (often written in dynamic languages) from parsing the multipart data themselves. The multipart grammar (RFC 2046) looks non-trivial and if I implement it by hand a lot of things can go wrong. Is there already a good, lightweight multipart/form-data parser written in C or C++? I'm looking for one with no external dependencies other than the C or C++ standard library. I don't need email attachment handling or buffered I/O classes or a portability runtime or whatever, just multipart/form-data parsing. Things that I've considered: GMime - depends on glib, so no go. libapreq - too large, depends on APR, badly documented, no unit tests. I've also looked at writing a parser with Ragel, but I can't figure out how to do it because the grammar is not static: the boundary can change arbitrarily.

    Read the article

  • How do I process multipart http responses in Ruby Net:HTTP?

    - by seal-7
    There is so much information out there on how to generate multipart responses or do multipart file uploads. I can't seem to find any information on how to process a multipart http response. Here is some IRB output from a multipart http response I am working with. >> response.http.content_type => "multipart/related" >> response.http.body[0..2048] => "\r\n------=_Part_3_806633756.1271797659309\r\nContent-Type: text/xml; charset=UTF-8\r\nContent-Transfer-Encoding: binary\r\nContent-Id: <A0FCC4333C6D0FCA346B97FAB6B61818>\r\n\r\n<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1:runReportResponse soapenv:encodingStyle="http://www.w3.org/2003/05/soap-encoding" xmlns:ns1="http://192.168.1.200:8080/jasperserver/services/repository"><ns2:result xmlns:ns2="http://www.w3.org/2003/05/soap-rpc">runReportReturn</ns2:result><runReportReturn xsi:type="xsd:string">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n&lt;operationResult version=&quot;2.0.1&quot;&gt;\n\t&lt;returnCode&gt;&lt;![CDATA[0]]&gt;&lt;/returnCode&gt;\n&lt;/operationResult&gt;\n</runReportReturn></ns1:runReportResponse></soapenv:Body></soapenv:Envelope>\r\n------=_Part_3_806633756.1271797659309\r\nContent-Type: application/pdf\r\nContent-Transfer-Encoding: binary\r\nContent-Id: <report>\r\n\r\n%PDF-1.4\n%\342\343\317\323\n3 0 obj

    Read the article

  • How to parse the multipart data in a restful service...

    - by AXS
    I have written a restful web service in c# and .net using the Restful Starter Kit that receives a mime multipart form via a stream. The multipart form contains a small xml fragment and a small file binary. I have read the stream in, and I have also written some code to parse the data to obtain the XML and the file binary. However, I feel that there should be some methods already written in the .net classes to allow me to access the two parts of the multipart form without having to parse the data myself. Does anyone have any ideas on how to do this?

    Read the article

  • Converting old Mailer to Rails 3 (multipart/mixed)

    - by Oscar Del Ben
    I'm having some difficulties converting this old mailer api to rails 3: content_type "multipart/mixed" part :content_type => "multipart/alternative" do |alt| alt.part "text/plain" do |p| p.body = render_message("summary_report.text.plain.erb", :message = message.gsub(/<.br./,"\n"), :campaign=campaign, :aggregate=aggregate, :promo_messages=campaign.participating_promo_msgs) end alt.part "text/html" do |p| p.body = render_message("summary_report.text.html.erb", :message = message, :campaign=campaign, :aggregate=aggregate,:promo_messages=campaign.participating_promo_msgs) end end if bounce_path attachment :content_type => "text/csv", :body=> File.read(bounce_path), :filename => "rmo_bounced_emails.csv" end attachment :content_type => "application/pdf", :body => File.read(report_path), :filename=>"rmo_report.pdf" In particular I don't understand how to differentiate the different multipart options. Any idea?

    Read the article

  • Upload a file with POST (multipart/form-data) using VBA

    - by Moses Ting
    Does anyone know if it's possible to upload a file via POST body (multipart/form-data) using VBA? I'm currently using the Microsoft.XMLHTTP object, but I'm not tied to it if that doesn't support multipart POST. Here's what I'm doing so far: Set oHttp = CreateObject("Microsoft.XMLHTTP") oHttp.Open "POST", theUrl, False oHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" oHttp.Send "body=thebody"

    Read the article

  • Apache2 mod_proxy and post-multipart size

    - by Pietro
    Hi, I have Apache2 configured to proxy all traffic directed to a specific virtual host to a local tomcat instance. All is good and fine but for multipart posts larger than ~100kb. Such posts fail on the tomcat end with an exception like SocketTimeoutException. If I connect directly to Tomcat (which listens on a port != 80) then all posts are handled just fine. The Apache virtual host config goes like this: NameVirtualHost * SetOutputFilter DEFLATE <VirtualHost *> ServerName foo.bar.com ErrorLog c:/wamp/logs/foo_error.log CustomLog c:/wamp/logs/foo_access.log combined ProxyTimeout 60 ProxyPass / http://localhost:10080/foo/ ProxyPassReverse / http://localhost:10080/foo/ ProxyPassReverseCookieDomain localhost bar.com ProxyPassReverseCookiePath /foo / </VirtualHost> I tried browsing the Apache2 and mod_proxy docs but found nothing useful. Any idea why Apache2 refuses to proxy requests bigger than X bytes ? Thanks!

    Read the article

  • rename/delete a folder from multipart rar file

    - by kikio
    Hello. I've a question: (I sent it in past) I have multipart rar file. Their contents are: file.part01.rar: myfolder (is a folder) data.cab -- file.part02.rar: myfolder (is a folder) data.cab <- file.part03.rar: myfolder (is a folder) data.cab <- file.part04.rar: difffolder (is a folder) anfolder (is a folder) data.cab <- file.part05.rar: myfolder (is a folder) data.cab <-- I want to extract it, so I right-click on "file.part01.rar" and select "Extract to ...". It extract 3 files, but in part 4, WinRAR said: "CRC. This file is currput." I think it problem is in the folders name in part04.rar. Is there anyway to rename folders in part04.rar? and cut "data.cab" from "afolder" to "difffolder". I really need it!! it is very emergency!!!!!!!! Thank you .....

    Read the article

  • Problems with sending a multipart/alternative email with PHP

    - by saturdayplace
    Here's the script that's builds/sends the email: $boundary = md5(date('U')); $to = $email; $subject = "My Subject"; $headers = "From: [email protected]" . "\r\n". "X-Mailer: PHP/".phpversion() ."\r\n". "MIME-Version: 1.0" . "\r\n". "Content-Type: multipart/alternative; boundary=--$boundary". "\r\n". "Content-Transfer-Encoding: 7bit". "\r\n"; $text = "You really ought remember the birthdays"; $html = '<html> <head> <title>Birthday Reminders for August</title> </head> <body> <p>Here are the birthdays upcoming in August!</p> <table> <tr> <th>Person</th><th>Day</th><th>Month</th><th>Year</th> </tr> <tr> <td>Joe</td><td>3rd</td><td>August</td><td>1970</td> </tr> <tr> <td>Sally</td><td>17th</td><td>August</td><td>1973</td> </tr> </table> </body> </html> '; $message = "Multipart Message coming up" . "\r\n\r\n". "--".$boundary. "Content-Type: text/plain; charset=\"iso-8859-1\"" . "Content-Transfer-Encoding: 7bit". $text. "--".$boundary. "Content-Type: text/html; charset=\"iso-8859-1\"". "Content-Transfer-Encoding: 7bit". $html. "--".$boundary."--"; mail("[email protected]", $subject, $message, $headers); It sends the message just fine, and my recipient receives it, but they get the whole thing in text/plain instead of in multipart/alternative. Viewing the source of the received message gives this (lots of cruft removed): Delivered-To: [email protected] Received: by 10.90.100.4 with SMTP id x4cs111413agb; Wed, 25 Mar 2009 16:39:32 -0700 (PDT) Received: by 10.100.153.6 with SMTP id a6mr85081ane.123.1238024372342; Wed, 25 Mar 2009 16:39:32 -0700 (PDT) Return-Path: <[email protected]> --- snip --- Date: Wed, 25 Mar 2009 17:37:36 -0600 (MDT) Message-Id: <[email protected]> To: [email protected] Subject: My Subject From: [email protected] X-Mailer: PHP/4.3.9 MIME-Version: 1.0 Content-Type: text/plain; boundary="--66131caf569f63b24f43d529d8973560" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 25 Mar 2009 23:38:30.0531 (UTC) FILETIME=[CDC4E530:01C9ADA2] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-5.600.1016-16540.005 X-TM-AS-Result: No--4.921300-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Multipart Message coming up --66131caf569f63b24f43d529d8973560 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit You really ought remember the birthdays --66131caf569f63b24f43d529d8973560 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit <html> <head> <title>Birthday Reminders for August</title> </head> <body> <p>Here are the birthdays upcoming in August!</p> <table> <tr> <th>Person</th><th>Day</th><th>Month</th><th>Year</th> </tr> <tr> <td>Joe</td><td>3rd</td><td>August</td><td>1970</td> </tr> <tr> <td>Sally</td><td>17th</td><td>August</td><td>1973</td> </tr> </table> </body> </html> --66131caf569f63b24f43d529d8973560-- It looks like the content-type header is getting changed along the way from multipart/alternative to text/plain. I'm no sysadmin, so if this is a sendmail issue I'm in way over my head. Any suggestions?

    Read the article

  • Problem posting multipart form data using Apache with mod_proxy to a mongrel instance

    - by Ryan E
    I am attempting to simulate my site's production environment as closely as I can on my local machine. This is a rails site that uses Apache w/ mod_proxy to forward requests to a mongrel cluster. On my Mac OSX Leopard machine, I have the default install of apache running and have configured a vhost to use mod_proxy to to forward requests to a local running mongrel instance on port 3000. <Proxy balancer://mongrel_cluster-development> BalancerMember http://127.0.0.1:3000 </Proxy> For the most part, this is working fine. I can browse my development site using the ServerName of the vhost I configured and can confirm that requests are being properly forwarded to the mongrel instance. However, there is a page on the site that has a multipart form that is used to upload an image to the server. When I post this form, there is a delay of about 5 minutes and the browser ultimately returns a Bad Request Your browser sent a request that this server could not understand. In the error log for my vhost: [Tue Sep 22 09:47:57 2009] [error] (70007)The timeout specified has expired: proxy: prefetch request body failed to 127.0.0.1:3000 (127.0.0.1) from ::1 () This same form works fine if I browse directly to the mongrel instance (http://127.0.0.1:3000). Anybody have any idea what the problem might be and how to fix it? If there is any important information that I neglected to include, post a comment, and I can add to this question. Note: Upon further investigation, this appears to be a problem specific to Safari. The form works fine in Firefox.

    Read the article

  • Load testing multipart form

    - by JacobM
    I'm trying to load-test a Rails application using JMeter. A critical part of the application involves a form that includes both text inputs and file uploads. It works fine in a browser, but when I try to post that page in JMeter, Rails is saving all of the parts of the multipart form as temp files, which causes things to break when it's looking for a string and gets a tempfile instead. It appears that the difference is that, from a browser, the piece of the multipart request that contains a text input looks like this: -----------------------------7d93b4186074c Content-Disposition: form-data; name="field_name" test -----------------------------7d93b4186074c while from JMeter it looks like this: -----------------------------7d159c1302d0y0 Content-Disposition: form-data; name="field_name" Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit test -----------------------------7d159c1302d0y0 So apparently Rails sees the former and interprets it as a plain text value and treats it as a string, but sees the latter and saves it to a temp file. I have not been able to find a setting to convince JMeter not to send the additional headers in the multipart form for non-file fields. Is there a way to convince Rails to ignore those headers and treat the text/plain text as strings instead of text files? Or a quick way to put a filter in front of my controller that will strip the extra headers? Alternately, is there a better tool to load-test a Rails application that includes file upload?

    Read the article

  • Problem posting multipart form data using Apache with mod_proxy to a mongrel instance

    - by Ryan E
    I am attempting to simulate my site's production environment as closely as I can on my local machine. This is a rails site that uses Apache w/ mod_proxy to forward requests to a mongrel cluster. On my Mac OSX Leopard machine, I have the default install of apache running and have configured a vhost to use mod_proxy to to forward requests to a local running mongrel instance on port 3000. <Proxy balancer://mongrel_cluster-development> BalancerMember http://127.0.0.1:3000 </Proxy> For the most part, this is working fine. I can browse my development site using the ServerName of the vhost I configured and can confirm that requests are being properly forwarded to the mongrel instance. However, there is a page on the site that has a multipart form that is used to upload an image to the server. When I post this form, there is a delay of about 5 minutes and the browser ultimately returns a Bad Request Your browser sent a request that this server could not understand. In the error log for my vhost: [Tue Sep 22 09:47:57 2009] [error] (70007)The timeout specified has expired: proxy: prefetch request body failed to 127.0.0.1:3000 (127.0.0.1) from ::1 () This same form works fine if I browse directly to the mongrel instance (http://127.0.0.1:3000). Anybody have any idea what the problem might be and how to fix it? If there is any important information that I neglected to include, post a comment, and I can add to this question. Note: Upon further investigation, this appears to be a problem specific to Safari. The form works fine in Firefox.

    Read the article

  • uploading via http post (multipart/form-data) silently fails with big files

    - by matteo
    When uploading multipart/form-data forms via a http post request to my apache web server, very big files (i.e. 30MB) are silently discarded. On the server side all looks as if the attached file was received with 0 bytes size. On the client side all looks like it had been uploaded succesfully (it takes the expected long time to upload and the browser gives no error message). On the server, nothing is logged into the error log. An entry is logged into the access log as if everything was ok (a post request and a 200 ok response). These uploads are being posted to a php script. In the php script, If I print_r $_FILES, I see the following information for the relevant file: [file5] => Array ( [name] => MOV023.3gp [type] => video/3gpp [tmp_name] => /tmp/phpgOdvYQ [error] => 0 [size] => 0 ) Note both [error] = 0 (which should mean no error) and [size] = 0 (as if the file was empty). My php script runs fine and receives all the rest of the data except these files. move_uploaded_file succeeds on these files and actually copies them as 0byte files. I've already changed the php directives max_upload_size to 50M and post_max_size to 200M, so neither the single file nor the request exceed any size limit. max_execution_time is not relevant, because the time to transfer the data does not count; and I've increased max_input_time to 1000 seconds, though this shouldn't be necessary since this is the time taken to parse the input data, not the time taken to upload it. Is there any apache configuration, prior to php, that could be causing these files to be discarded even prior to php execution? Some limit in size or in upload time? I've read about a default 300 seconds timeout limit, but this should apply to the time the connection is idle, not the time it takes while actually transferring data, right? Needless to say, uploads with all exactly identical conditions (including file format, client and everything) except smaller file size, work seamlessly, so the issue is clearly related to the file or request size, or to the time it takes to send it.

    Read the article

  • Decode received multipart/form-data request in Cocoa

    - by Snej
    Hi: I wonder if there is any possibility to explicitly decode an incoming multipart/form-data POST request. Is there any lib to handle this safely? Several files are embedded in this request and I want to save these files individually. NSData *data = [(id)CFHTTPMessageCopyBody(request) autorelease]; Content-Type: multipart/form-data; boundary=0xKhTmLbOuNdArY The data content is: --0xKhTmLbOuNdArY Content-Disposition: form-data; name="file1"; filename="fileName1.extension" Content-Type: application/octet-stream; charset=utf-8 ......... --0xKhTmLbOuNdArY Content-Disposition: form-data; name="file2"; filename="fileName2.extension" Content-Type: application/octet-stream; charset=utf-8 ......... --0xKhTmLbOuNdArY--

    Read the article

  • Does form with enctype="multipart/form-data" cause problems accessing a hidden field

    - by Ankur
    I have created a hidden form element <form name="UploadImage" enctype="multipart/form-data" method="post" action="UploadImage"> <label> </label> <input name="imgUploadObjId" id="imgUploadObjId" value="52" type="hidden"> //rest of the form here </form> And I am trying to get the value with this line in a servlet (as I have done before): int objId = Integer.parseInt(request.getParameter("imgUploadObjId")); But I get this (line 33 is the line above): java.lang.NumberFormatException: null java.lang.Integer.parseInt(Unknown Source) java.lang.Integer.parseInt(Unknown Source) web.objects.UploadImage.doPost(UploadImage.java:33) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) Is there something different about a form with enctype="multipart/form-data"? Or can you see some other error.

    Read the article

  • remove enctype=multipart from the asp.net form(Sharepoint)

    - by ps123
    I have a form that I want to postback to some other server on button click . I am using onpostbackurl ...Its posting the form to other server but text field input is not getting into other server. If I remove enctype="multipart.. it seems to be working fine...but the thing is I am doing all this in sharepoint and <formid="aspnetform" enctype="multipart/datapart"...is getting added on its own..... in my control I am giving text field and button only .....Any idea how to achieve this...?

    Read the article

  • Looping through array in PHP to post several multipart form-data

    - by Léon Pelletier
    I'm trying in an asp web application to code a function that would loop through a list of files in a multiple upload form and send them one by one. Is this something that can be done in ASP? Because I've read some posts about how to attach several files together, but saw nothing about looping through the files. I can easily imagine it in C# via HttpWebRequest or with socket, but in php, I guess there are already function designed to handle it? // This is false/pseudo-code :) for (int index = 0; index < number_of_files; index++) { postfile(file[index]); } And in each iteration, it should send a multipart form-data POST. postfile(TheFileInfos) should make a POST like it: POST /afs.aspx?fn=upload HTTP/1.1 [Header stuff] Content-Type: multipart/form-data; boundary=----------Ef1Ef1cH2Ij5GI3ae0gL6KM7GI3GI3 [Header stuff] ------------Ef1Ef1cH2Ij5GI3ae0gL6KM7GI3GI3 Content-Disposition: form-data; name="Filename" myimage1.png ------------Ef1Ef1cH2Ij5GI3ae0gL6KM7GI3GI3 Content-Disposition: form-data; name="fileid" 58e21ede4ead43a5201206101806420000007667212251 ------------Ef1Ef1cH2Ij5GI3ae0gL6KM7GI3GI3 Content-Disposition: form-data; name="Filedata"; filename="myimage1.png" Content-Type: application/octet-stream [Octet Stream] [Edit] I'll try it: <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form name="form1" enctype="multipart/form-data" method="post" action="processFiles.php"> <p> <? // start of dynamic form $uploadNeed = $_POST['uploadNeed']; for($x=0;$x<$uploadNeed;$x++){ ?> <input name="uploadFile<? echo $x;?>" type="file" id="uploadFile<? echo $x;?>"> </p> <? // end of for loop } ?> <p><input name="uploadNeed" type="hidden" value="<? echo $uploadNeed;?>"> <input type="submit" name="Submit" value="Submit"> </p> </form> </body> </html>

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >