Search Results

Search found 208 results on 9 pages for 'enctype'.

Page 2/9 | < Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >

  • 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

  • http transfer file from server to server

    - by qualle
    Hi, with html forms we can upload a file from a client to a server with enctype="multipart/form-data", input type="file" and so on. Is there a way to have a file already ON the server and transfer it to another server the same way? Thanks for hints.

    Read the article

  • How to Upload a file from client to server using OFBIZ?

    - by SIVAKUMAR.J
    I'm new to ofbiz so try to keep your answer as simple as possibly. If you can give examples that would be kind. My problem is I created a project inside the ofbiz/hot-deploy folder namely productionmgntSystem. Inside the folder ofbiz\hot-deploy\productionmgntSystem\webapp\productionmgntSystem I created a file app_details_1.ftl. The following are the code of this file <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> <script TYPE="TEXT/JAVASCRIPT" language=""JAVASCRIPT"> function uploadFile() { //alert("Before calling upload.jsp"); window.location='<@ofbizUrl>testing_service1</@ofbizUrl>' } </script> </head> <!-- <form action="<@ofbizUrl>testing_service1</@ofbizUrl>" enctype="multipart/form-data" name="app_details_frm"> --> <form action="<@ofbizUrl>logout1</@ofbizUrl>" enctype="multipart/form-data" name="app_details_frm"> <center style="height: 299px; "> <table border="0" style="height: 177px; width: 788px"> <tr style="height: 115px; "> <td style="width: 103px; "> <td style="width: 413px; "><h1>APPLICATION DETAILS</h1> <td style="width: 55px; "> </tr> <tr> <td style="width: 125px; ">Application name : </td> <td> <input name="app_name_txt" id="txt_1" value=" " /> </td> </tr> <tr> <td style="width: 125px; ">Excell sheet &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </td> <td> <input type="file" name="filename"/> </td> </tr> <tr> <td> <!-- <input type="button" name="logout1_cmd" value="Logout" onclick="logout1()"/> --> <input type="submit" name="logout_cmd" value="logout"/> </td> <td> <!-- <input type="submit" name="upload_cmd" value="Submit" /> --> <input type="button" name="upload1_cmd" value="Upload" onclick="uploadFile()"/> </td> </tr> </table> </center> </form> </html> the following coding is present in the file ofbiz\hot-deploy\productionmgntSystem\webapp\productionmgntSystem\WEB-INF\controller.xml ...... ....... ........ <request-map uri="testing_service1"> <security https="true" auth="true"/> <event type="java" path="org.ofbiz.productionmgntSystem.web_app_req.WebServices1" invoke="testingService"/> <response name="ok" type="view" value="ok_view"/> <response name="exception" type="view" value="exception_view"/> </request-map> .......... ............ .......... <view-map name="ok_view" type="ftl" page="ok_view.ftl"/> <view-map name="exception_view" type="ftl" page="exception_view.ftl"/> ................ ............. ............. The following are the coding present in the file ofbiz\hot-deploy\productionmgntSystem\src\org\ofbiz\productionmgntSystem\web_app_req\WebServices1.java package org.ofbiz.productionmgntSystem.web_app_req; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.DataInputStream; import java.io.FileOutputStream; import java.io.IOException; public class WebServices1 { public static String testingService(HttpServletRequest request, HttpServletResponse response) { //int i=0; String result="ok"; System.out.println("\n\n\t*************************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response)- Start"); String contentType=request.getContentType(); System.out.println("\n\n\t*************************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response)- contentType : "+contentType); String str=new String(); // response.setContentType("text/html"); //PrintWriter writer; if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) { System.out.println("\n\n\t**********************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response) after if (contentType != null)"); try { // writer=response.getWriter(); System.out.println("\n\n\t**********************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response) - try Start"); DataInputStream in = new DataInputStream(request.getInputStream()); int formDataLength = request.getContentLength(); byte dataBytes[] = new byte[formDataLength]; int byteRead = 0; int totalBytesRead = 0; //this loop converting the uploaded file into byte code while (totalBytesRead < formDataLength) { byteRead = in.read(dataBytes, totalBytesRead,formDataLength); totalBytesRead += byteRead; } String file = new String(dataBytes); //for saving the file name String saveFile = file.substring(file.indexOf("filename=\"") + 10); saveFile = saveFile.substring(0, saveFile.indexOf("\n")); saveFile = saveFile.substring(saveFile.lastIndexOf("\\")+ 1,saveFile.indexOf("\"")); int lastIndex = contentType.lastIndexOf("="); String boundary = contentType.substring(lastIndex + 1,contentType.length()); int pos; //extracting the index of file pos = file.indexOf("filename=\""); pos = file.indexOf("\n", pos) + 1; pos = file.indexOf("\n", pos) + 1; pos = file.indexOf("\n", pos) + 1; int boundaryLocation = file.indexOf(boundary, pos) - 4; int startPos = ((file.substring(0, pos)).getBytes()).length; int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length; //creating a new file with the same name and writing the content in new file FileOutputStream fileOut = new FileOutputStream("/"+saveFile); fileOut.write(dataBytes, startPos, (endPos - startPos)); fileOut.flush(); fileOut.close(); System.out.println("\n\n\t**********************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response) - try End"); } catch(IOException ioe) { System.out.println("\n\n\t*********************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response) - Catch IOException"); //ioe.printStackTrace(); return("exception"); } catch(Exception ex) { System.out.println("\n\n\t*********************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response) - Catch Exception"); return("exception"); } } else { System.out.println("\n\n\t********************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response) else part"); result="exception"; } System.out.println("\n\n\t*************************************\n\tInside WebServices1.testingService(HttpServletRequest request, HttpServletResponse response)- End"); return(result); } } I want to upload a file to the server. The file is get from user " tag in the "app_details_1.ftl" file & it is updated into the server by using the method "testingService(HttpServletRequest request, HttpServletResponse response)" in the class "WebServices1". But the file is not uploaded. Give me a good solution for uploading a file to the server.

    Read the article

  • How to convert html textfield/area data to server-side txt file? [closed]

    - by olijake
    How can I make a script that will convert the text/data in a html textfield/textarea and send it to the server, which then saves it as a .txt file for storage? NOTE: I am hosting a website(for testing purposes) using Apache 2.2 on a Windows 7 machine. I downloaded PHP version 5.4.7, but have not yet installed on my server yet (not sure if I will need it, but also not sure how to install it). 1st problem: Saving text to server Html page/section with title textfield, text textarea, and submit button. You would enter a title, the text/notes you need in the textfield, then press the submit button to have it store the text in the textarea, as a .txt file on the server called .txt. 2nd problem: Opening text from server Html with list of all txt files OR textfield for entering in title, then submit button to send the title of the requested .txt file to the server, which would then load it up on the page. Here is what I have so far: (let me know if there is something that I should change or if something just isn't correct in the index.html code I have right now.) <!DOCTYPE HTML> <html> <head> <title>Insert Title</title> <meta http-equiv="Content-Type" content="Text/HTML; charset=UTF-8"/> </head> <body> <form method="post" action="save.INSERT_FILETYPE" name="textfile" enctype="multipart/form-data"> <input type="text" name="title"><br/> <textarea rows="20" cols="100" id="text" name="text"></textarea><br/> <input type="submit" name="submit" value="Submit Text to Server"> </form><br/> <hr style="width: 100%; height: 4px;"><br/> <form method="post" action="open.INSERT_FILETYPE" name="textfile" enctype="multipart/form-data"> <input type="text" name="title"><br/> <input type="submit" name="submit" value="Submit Txt File Request"> </form><br/> <div>Opened text file displays here or goes on another page</div> </body> </html> I plan on using a server side language/script, but ANYTHING that gets the job done is fine. I already tried looking into using some ASP/jScript/PHP, but have had some trouble implementing it into my server. (ie: getting the modules loaded and telling the server what file types to parse.) I know this may be an extremely easy fix, but then in that case, hopefully you wouldn't mind helping me out a little :). If it turns out that this is MUCH more complicated than I expect, then feel free to let me know that, so I don't waste me time running in circles. I appreciate any help/assistance that you can provide, Thanks, Jake EDIT: Wrong Apache version. In response to the comments/closing of this thread: My question: "How exactly do I install the PHP module on the apache server? and is this even possible? and is this even recommended?" ^ In case I wasn't clear enough already To Clarify: I understand the basics of PHP, I just have trouble with INSTALLING PHP on the apache server. (I have used PHP before, but never successfully on apache (so far...)) For my script I wrote something similar to this already (using fopen() and a few other commands): <?php fopen("notes.txt", "r"); file_put_contents("notes.txt",teststring1); ?> I have used javascript for this task before also (although I prefer using PHP and server-side languages): <script language="javascript"> function WriteToFile(){ var fso = new ActiveXObject("Scripting.FileSystemObject"); var s = fso.CreateTextFile("C:\\NewFile.txt", true); var text=document.getElementById("TextArea1").innerText; s.WriteLine(text); s.WriteLine('***********************'); s.Close(); } </script>

    Read the article

  • heimdal error Decrypt integrity check failed for checksum type

    - by user880414
    when I try to authentication with heimdal-kdc ,I get this error in kdc log : (enctype aes256-cts-hmac-sha1-96) error Decrypt integrity check failed for checksum type hmac-sha1-96-aes256, key type aes256-cts-hmac-sha1-96 and authentication failed!!! but authentication with kinit is correct!! my kerb5.conf is [logging] default = FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log krb5 = FILE:/var/log/krb5.log [libdefaults] default_realm = AUTH.LANGHUA clockskew = 300 [realms] AUTH.LANGHUA = { kdc = AUTH.LANGHUA } [domain_realm] .langhua = AUTH.LANGHUA [kdc] and when add this line to krb5.conf (in kdc tag) require-preauth = no I get this error krb5_get_init_creds: Client have no reply key

    Read the article

  • How to Implement Complex Form Data?

    - by SoulBeaver
    I'm supposed to implement a relatively complex form that looks like follows, but has at least four more pages requiring the user to fill in all necessary information for the tracks: This data will need to be sent to the server, which is implemented using Dropwizard. I'm looking for best practices on how to upload and send such a complex form with potentially dozens of songs to the server. The simplest available solution I have seen is a simple multipart/form-data request with the following form schema (Source): Client <html> <body> <h1>File Upload with Jersey</h1> <form action="rest/file/upload" method="post" enctype="multipart/form-data"> <p> Select a file : <input type="file" name="file" size="45" /> </p> <input type="submit" value="Upload It" /> </form> </body> </html> Server @POST @Path("/upload") @Consumes(MediaType.MULTIPART_FORM_DATA) public Response uploadTrack(final FormDataMultiPart multiPart) { List<FormDataBodyPart> artists = multiPart.getFields("artist"); StringBuffer output = new StringBuffer(); for (FormDataBodyPart artist : artists) output.append(artist.getValueAs(String.class)); List<FormDataBodyPart> tracks = multiPart.getFields("track"); for (FormDataBodyPart track : tracks) writeToFile(track.getValueAs(InputStream.class), "Foo"); return Response.status(200).entity(output.toString()).build(); } Then I have also read about file uploads via Ajax or Formdata (Mozilla HttpRequest) which allows for Posts in the formats application/x-www-form-urlencoded, multipart/form-data, or text/plain. I don't know which approach, if any, is best. An ideal solution would be to utilize Jackson to convert a json string into my data objects, but I don't get the impression that this is possible with binary data.

    Read the article

  • upload file on database through php code

    - by ruhit
    hi all I have made an application to upload files and its workingout well.now I want to upload my files on database and I also want to display the uploaded files names on my listby accessing the database....so kindly help me. my codes are given below- function uploadFile() { global $template; //$this->UM_index = $this->session->getUserId(); switch($_REQUEST['cmd']){ case 'upload': $filename = array(); //set upload directory //$target_path = "F:" . '/uploaded/'; for($i=0;$i<count($_FILES['ad']['name']);$i++){ if($_FILES["ad"]["name"]) { $filename = $_FILES["ad"]["name"][$i]; $source = $_FILES["ad"]["tmp_name"][$i]; $type = $_FILES["ad"]["type"]; $name = explode(".", $filename); $accepted_types = array('text/html','application/zip', 'application/x-zip-compressed', 'multipart/x-zip', 'application/x-compressed'); foreach($accepted_types as $mime_type) { if($mime_type == $type) { $okay = true; break; } } $continue = strtolower($name[1]) == 'zip' ? true : false; if(!$continue) { $message = "The file you are trying to upload is not a .zip file. Please try again."; } $target_path = "F:" . '/uploaded/'.$filename; // change this to the correct site path if(move_uploaded_file($source, $target_path )) { $zip = new ZipArchive(); $x = $zip->open($target_path); if ($x === true) { $zip->extractTo("F:" . '/uploaded/'); // change this to the correct site path $zip->close(); unlink($target_path); } $message = "Your .zip file was uploaded and unpacked."; } else { $message = "There was a problem with the upload. Please try again."; } } } echo "Your .zip file was uploaded and unpacked."; $template->main_content = $template->fetch(TEMPLATE_DIR . 'donna1.html'); break; default: $template->main_content = $template->fetch(TEMPLATE_DIR . 'donna1.html'); //$this->assign_values('cmd','uploads'); $this->assign_values('cmd','upload'); } } my html page is <html> <link href="css/style.css" rel="stylesheet" type="text/css"> <!--<form action="{$path_site}{$index_file}" method="post" enctype="multipart/form-data">--> <form action="index.php?menu=upload_file&cmd=upload" method="post" enctype="multipart/form-data"> <div id="main"> <div id="login"> <br /> <br /> Ad No 1: <input type="file" name="ad[]" id="ad1" size="10" />&nbsp;&nbsp;Image(.zip)<input type="file" name="ad[]" id="ad1" size="10" /> Sponsor By : <input type="text" name="ad3" id="ad1" size="25" /> <br /> <br /> </div> </div> </form> </html>

    Read the article

  • How to post a file via HTTP post in vb.net

    - by Worz
    Hi all! Having a problem with sending a file via HTTP post in vb.net. I am trying to mimic the following HTML so the vb.net does the same thing. <form enctype="multipart/form-data" method="post" action="/cgi-bin/upload.cgi"> File to Upload: <input type="file" name="filename"/> <input type="submit" value="Upload" name="Submit"/> </form> Hope someone can help!

    Read the article

  • Simple form not working anymore, since adding jquery tablesorter on same page

    - by Michael
    Hi, I'm using jquery and tablesorter plugin to sort a table in a php-page, which works flawless. Further I have this form in it: <form name="newrs" id="newrs" action="edit.php" enctype="multipart/form-data" method="POST" onSubmit=""> <input class="btn" id="bbtnNew" name="button" type="submit" value="New Recordset" /> </form> But since I added the jquery/tablesorter functionality, the form doesn't work anymore. (If I click on submit, nothing happens. What causes this behaviour? And how can I overcome this? Thanks in advance for your suggestions! .... Initializing the tablesorter with this code: <script type="text/javascript"> $(document).ready(function() { $("#myTable").tablesorter( { sortList: [ [4,1] ] , widgets: ['zebra'] } ); } ); </script>

    Read the article

  • How to submit a form OnKeyPress with Javascript?

    - by Zoltan Repas
    Hi! I want to make a form like this, and i want to post the form - with javascript - in all the keydowns. <form action="{$formaction}" enctype="multipart/form-data" method="post"> <input type="text" name="n"> <input type="password" name="pw"> <button name="in" type="submit">enter</button> </form> please tell me how to do this.

    Read the article

  • Upload Image with Django Model Form

    - by jmitchel3
    I'm having difficulty uploading the following model with model form. I can upload fine in the admin but that's not all that useful for a project that limits admin access. #Models.py class Profile(models.Model): name = models.CharField(max_length=128) user = models.ForeignKey(User) profile_pic = models.ImageField(upload_to='img/profile/%Y/%m/') #views.py def create_profile(request): try: profile = Profile.objects.get(user=request.user) except: pass form = CreateProfileForm(request.POST or None, instance=profile) if form.is_valid(): new = form.save(commit=False) new.user = request.user new.save() return render_to_response('profile.html', locals(), context_instance=RequestContext(request)) #Profile.html <form enctype="multipart/form-data" method="post">{% csrf_token %} <tr><td>{{ form.as_p }}</td></tr> <tr><td><button type="submit" class="btn">Submit</button></td></tr> </form> Note: All the other data in the form saves perfectly well, the photo does not upload at all. Thank you for your help!

    Read the article

  • Display a "Waiting Message" before the POST form send

    - by DomingoSL
    I have a upload file form, when you hit Submit it send the file to my server, but it takes a while, in the mean time i need to tell the user wait in order to get the file uploaded, because he can press Submit again because there is no menssage to prevent him. So, the user fill a few fields in the form, including a file. When he Send the form it sends the variables via POST to the same page: <form action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data" method="post"> A php script detect the page now have POST variables a do something. In the time between the send action and the page reload i need to display a mensage, how can i do that??? Thanks It will be nice if you now how to trigger that with colorbox. I know how to use it from a link but no from this POST action.

    Read the article

  • Can I use some combination of HttpHandler and HttpModule to create an asynchronous file upload?

    - by scottm
    I am trying to write a simple asynchronous file upload control for ASP.Net. I've tried a few implementations out there (AjaxControl Toolkit Async Upload, Telerik RadAsyncUpload, AjaxUploader, Uploadify, etc.), but they all leave me wanting something more. I'd rather not use a Flash component, a simple throbber would be OK. Some don't have client side call backs. I figure you can make an http module that checks the request form's enctype and files collection on BeginRequest and save those files to disk. Then somehow use an httpHandler to poll the module's status but I can't quite figure out how to put it all together asynchronously. Can you help me arrange the pieces?

    Read the article

  • Display a "Waiting Menssage" before the POST form send

    - by DomingoSL
    I have a upload file form, when you hit Submit it send the file to my server, but it takes a while, in the mean time i need to tell the user wait in order to get the file uploaded, because he can press Submit again because there is no menssage to prevent him. So, the user fill a few fields in the form, including a file. When he Send the form it sends the variables via POST to the same page: <form action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data" method="post"> A php script detect the page now have POST variables a do something. In the time between the send action and the page reload i need to display a mensage, how can i do that??? Thanks It will be nice if you now how to trigger that with colorbox. I know how to use it from a link but no from this POST action.

    Read the article

  • How to make Asynchronous(AJAX) File Upload using iframe ?

    - by BugKiller
    Hi, I'm trying to make ajax file upload . I read that it is not possible to do that without using iframe . I wrote : <iframe id="uploadTrg" name="uploadTrg" height="0" width="0" frameborder="0" scrolling="yes"></iframe> <form id="myForm" action="file-component" method="post" enctype="multipart/form-data" target="uploadTrg"> File: <input type="file" name="file"> <input type="submit" value="Submit" id="submitBtn"/> </form> and using jquery form plugin : $('#myForm').ajaxForm({ dataType: 'json', success: function(data){ alert(data.toSource()); } }); The Result : the file is uploaded successfully and I can see the uploaded file , but a dialog box appears : since I send back a json result to display the file name + size etc .. My Question : How can I use the iFrame to be able to make " ajax file upload".

    Read the article

  • What is the proper PHP syntax to post a file that exists in a directory that's on the server?

    - by ggg
    This is a basic post form in PHP that loads from the client PC. What is the proper syntax to load from a directory on the server? <form enctype="multipart/form-data" action="index.php?option=com_productionparse" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="90000000000" /><br /> Choose a file to upload: <input name="file" size=120 type="file" /><br /> <input type="submit" value="Upload File" /> </form>

    Read the article

  • HTML Form Upload PDF with other form contents using PHP

    - by Sev
    I have a HTML form with fields such as name, address, notes, etc. I also have a field to upload a PDF. The uploaded PDF get's stored on the file system. How can I accomplish this if possibly the PDF files are larger than 2 MBs? Also, for some reason, the uploading of the PDF (< 2 MBs) works fine in Chrome, but not in IE. In IE, the upload doesn't even begin, but in Chrome, it completes fine. Form header looks like: method='post' ENCTYPE='multipart/formdata' edit: the ini setting didn't help The HTML <input type='text' name='user' /> <input type='file' name='userfile' /> The basic PHP ( I do some preg matching above, that I haven't included) $uploaddir = 'uploads/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\n"; } else { echo "File uploading failed.\n"; }

    Read the article

  • Django file uploads - Just can't work it out

    - by phoebebright
    OK I give up - after 5 solid hours trying to get a django form to upload a file, I've checked out all the links in stackoverflow and googled and googled. Why is it so hard, I just want it to work like the admin file upload? So I get that I need code like: if submitForm.is_valid(): handle_uploaded_file(request.FILES['attachment']) obj = submitForm.save() and I can see my file in request.FILES['attachment'] (yes I have enctype set) but what am I supposed to do in handle_uploaded_file? The examples all have a fixed file name but obviously I want to upload the file to the directory I defined in the model, but I can't see where I can find that. def handle_uploaded_file(f): destination = open('fyi.xml', 'wb+') for chunk in f.chunks(): destination.write(chunk) destination.close() Bet I'm going to feel really stupid when someone points out the obvious!

    Read the article

  • http script to php?

    - by Simon
    Does anyone know how to write this code in php? <html> <form action="https://start.exactonline.nl/docs/XMLDivisions.aspx" method="POST" enctype="application/x-www-form-urlencoded" > <input type="hidden" name="_UserName_" value="*****"> <input type="hidden" name="_Password_" value="****"> <input type ="submit" value="Login"> </form> <form action ="https://start.*****.nl//docs/XMLDownload.aspx?Topic=GLTransactions&output=1&PartnerKey={672c4524-807b-4595-9518-78d848b3e9c6}" method="post"> <input type="submit" value="xmlinput"> </form> </html> Thnx in advance!

    Read the article

  • jqueryForm and empty uploads

    - by Aiden Bell
    Hi All, Been scratching my head for too long on this: Using jquery.form, (http://malsup.com/jquery/form) with PHP ... my $_FILES['someimage'] gets set but the error number is always UPLOAD_ERR_NO_FILE, size is also 0. The JavaScript: $('form input[type=file]').change(function(){ $(this).clone().appendTo('#imgform'); $('#imgform').ajaxForm(); $('#imgform').ajaxSubmit( { type:'POST' } ); }); Which appends to: <form id="imgform" method="POST" action="/api/images.php" enctype="multipart/form-data"></form> From another form which has bog-standard file inputs. PHP logs are clean, but var_dumping $_FILES always shows that the index is set to the name of the form element ... but no data. Thanks guys! (Sorry, I know jQuery-like questions are too frequent round these parts).

    Read the article

  • [Ruby on Rails] scribd_fu gsub error

    - by siulamvictor
    I have an application which allow user upload documents to Scribd. I tried to use scribd_fu in Rails. An error occurred when the controller try to save the model. NoMethodError in DocumentsController#processupload private method `gsub' called for nil:NilClass here is the related controller def processupload @document = Document.new(params[:document]) if @document.save session[:scribdid] = @document.ipaper_access_key else xxxxx and this is the related html form <form action="/documents/processupload" enctype="multipart/form-data" method="post"> <input name="authenticity_token" type="hidden" value="FqTCmlGGIvRjiaiaa+YtF50wgI7FfpxfrZsulLCbXcw=" /> <label class="label_h2">Upload a Document</label> <input id="document_document_upload" name="document[document_upload]" size="30" type="file" /></div> <div class="buttons"><button type="submit" class="positive"><img src="/images/icons/tick.png" alt="Save Document"/>Save Document</button> </form> Is there anything wrong?

    Read the article

  • Null file when uploading via MVC

    - by Josh
    I have the following form on an .NET MVC View: <form method="post" enctype="multipart/form-data" action="/Video/UploadDocument"> <input type="file" id="document1" name="document1"/> <input type="submit" value="Save"/> </form> And the controller has the following signature that gets called: public ActionResult UploadDocument(HttpPostedFileBase file) { return View(); } When I break inside the UploadDocument method, the parameter 'file' is null. I've selected a valid document on my desktop and know it contains text. What am I missing to get this file upload working?

    Read the article

  • How to post Arabic characters in PHP

    - by Peter Stuart
    Okay, So I am writing an OpenCart extension that must allow Arabic characters when posting data. Whenever I post ????? the print_r($_POST) returns with this: u0645u0631u062du0628u0627 I check the HTML header and it has this: <meta charset="UTF-8" /> I checked the PHP file that triggers all SQL queries and it has this code: mysql_query("SET NAMES 'utf8'", $this->link); mysql_query("SET CHARACTER SET utf8", $this->link); mysql_query("SET CHARACTER_SET_CONNECTION=utf8", $this->link); This is in my form tag: <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form" accept-charset="utf-8"> I can't think of what else I am doing wrong. The rest of the OpenCart framework supports UTF8 and arabic characters. It is just in this instance where I can't post anything arabic? Could someone please help me? Many Thanks Peter

    Read the article

  • How can I transform this haml into a table?

    - by mmr
    I have the following haml code: - @theLinks.each_index do |x| %br %form{:action=>'/Download', :method=>"post",:enctype=>"multipart/form-data"} %input{:type=>"submit", :name=>"#{@theLinks[x].url}", :value=>"Name: #{@theLinks[x].Name} Study Time: #{@theLinks[x].studyTime} Comments: #{@theLinks[x].comments}"} Basically, for each person, list the time they participated in a study and the comments on the study. Right now, this renders as a set of buttons. I'd like to render it as a table, with each row clickable in the same way (ie, using the 'post' method, so that only the haml file has to be edited without touching the rest of the files). Ideally, I'd also like to be able to sort the table by name, time, or comments, but that might be getting ahead of myself. So how can I change this list of buttons into a table with clickable rows?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9  | Next Page >