Search Results

Search found 386 results on 16 pages for 'fileupload'.

Page 7/16 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How do I retain uploaded files after POsting a form with a file upload?

    - by Ali
    Hi guys is it possible to be able to retain an uploaded file AFTER its been uploaded I mean I'm building a compose email application. Users can upload files as attachments. AT times out of 10 uploaded files one of them isn't uploaded correctly or the submitted form is invalid the compose page would be displayed again however the user would ned to upload the file again this time. Is it possible to somehow maintain the uploaded files somewhere on the first upload and if the form is invalid - be able to display links to the file uploaded or so?

    Read the article

  • Problem in file upload

    - by Niraj CHoubey
    whenever i am uploading trying to upload file having size more than the size specified in maxRequestLength , browser is showing "webpage can not be displayed" . an someone please tell me how to solve this problem

    Read the article

  • Unfailing Javascript Image Preview

    - by Jason
    I have the following code that presents the user with a preview of the image they're trying to upload and works really well in FF: var img = document.createElement('img'); img.src = $('#imageUploader').get(0).files[0].getAsDataURL(); The problem is, getAsDataURL() only works in FF. Is there something similar/a workaround for this kind of functionality in Chrome (specifically)?

    Read the article

  • Form File Upload with other TextBox Inputs + Creating Custom Form Action attribute

    - by Jonathan Stowell
    Hi All, I am attempting to create a form where a user is able to enter your typical form values textboxes etc, but also upload a file as part of the form submission. This is my View code it can be seen that the File upload is identified by the MCF id: <% using (Html.BeginForm("Create", "Problem", FormMethod.Post, new { id = "ProblemForm", enctype = "multipart/form-data" })) {%> <p> <label for="StudentEmail">Student Email (*)</label> <br /> <%= Html.TextBox("StudentEmail", Model.Problem.StudentEmail, new { size = "30", maxlength=26 })%> <%= Html.ValidationMessage("StudentEmail", "*") %> </p> <p> <label for="Type">Communication Type (*)</label> <br /> <%= Html.DropDownList("Type") %> <%= Html.ValidationMessage("Type", "*") %> </p> <p> <label for="ProblemDateTime">Problem Date (*)</label> <br /> <%= Html.TextBox("ProblemDateTime", String.Format("{0:d}", Model.Problem.ProblemDateTime), new { maxlength = 10 })%> <%= Html.ValidationMessage("ProblemDateTime", "*") %> </p> <p> <label for="ProblemCategory">Problem Category (* OR Problem Outline)</label> <br /> <%= Html.DropDownList("ProblemCategory", null, "Please Select...")%> <%= Html.ValidationMessage("ProblemCategory", "*")%> </p> <p> <label for="ProblemOutline">Problem Outline (* OR Problem Category)</label> <br /> <%= Html.TextArea("ProblemOutline", Model.Problem.ProblemOutline, 6, 75, new { maxlength = 255 })%> <%= Html.ValidationMessage("ProblemOutline", "*") %> </p> <p> <label for="MCF">Mitigating Circumstance Form</label> <br /> <input id="MCF" type="file" /> <%= Html.ValidationMessage("MCF", "*") %> </p> <p> <label for="MCL">Mitigating Circumstance Level</label> <br /> <%= Html.DropDownList("MCL") %> <%= Html.ValidationMessage("MCL", "*") %> </p> <p> <label for="AbsentFrom">Date Absent From</label> <br /> <%= Html.TextBox("AbsentFrom", String.Format("{0:d}", Model.Problem.AbsentFrom), new { maxlength = 10 })%> <%= Html.ValidationMessage("AbsentFrom", "*") %> </p> <p> <label for="AbsentUntil">Date Absent Until</label> <br /> <%= Html.TextBox("AbsentUntil", String.Format("{0:d}", Model.Problem.AbsentUntil), new { maxlength = 10 })%> <%= Html.ValidationMessage("AbsentUntil", "*") %> </p> <p> <label for="AssessmentID">Assessment Extension</label> <br /> <%= Html.DropDownList("AssessmentID") %> <%= Html.ValidationMessage("AssessmentID", "*") %> <%= Html.TextBox("DateUntil", String.Format("{0:d}", Model.AssessmentExtension.DateUntil), new { maxlength = 16 })%> <%= Html.ValidationMessage("DateUntil", "*") %> </p> <p> <label for="Details">Assessment Extension Details</label> <br /> <%= Html.TextArea("Details", Model.AssessmentExtension.Details, 6, 75, new { maxlength = 255 })%> <%= Html.ValidationMessage("Details", "*") %> </p> <p> <label for="RequestedFollowUp">Requested Follow Up</label> <br /> <%= Html.TextBox("RequestedFollowUp", String.Format("{0:d}", Model.Problem.RequestedFollowUp), new { maxlength = 16 })%> <%= Html.ValidationMessage("RequestedFollowUp", "*") %> </p> <p> <label for="StaffEmail">Staff</label> <br /> <%= Html.ListBox("StaffEmail", Model.StaffEmail, new { @class = "multiselect" })%> <%= Html.ValidationMessage("StaffEmail", "*")%> </p> <p> <input class="button" type="submit" value="Create Problem" /> </p> This is my controller code: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create(Problem problem, AssessmentExtension assessmentExtension, Staff staffMember, HttpPostedFileBase file, string[] StaffEmail) { if (ModelState.IsValid) { try { Student student = studentRepository.GetStudent(problem.StudentEmail); Staff currentUserStaffMember = staffRepository.GetStaffWindowsLogon(User.Identity.Name); var fileName = Path.Combine(Request.MapPath("~/App_Data"), Path.GetFileName(file.FileName)); file.SaveAs(@"C:\Temp\" + fileName); if (problem.RequestedFollowUp.HasValue) { String meetingName = student.FirstName + " " + student.LastName + " " + "Mitigating Circumstance Meeting"; OutlookAppointment outlookAppointment = new OutlookAppointment(currentUserStaffMember.Email, meetingName, (DateTime)problem.RequestedFollowUp, (DateTime)problem.RequestedFollowUp.Value.AddMinutes(30)); } problemRepository.Add(problem); problemRepository.Save(); if (assessmentExtension.DateUntil != null) { assessmentExtension.ProblemID = problem.ProblemID; assessmentExtensionRepository.Add(assessmentExtension); assessmentExtensionRepository.Save(); } ProblemPrivacy problemPrivacy = new ProblemPrivacy(); problemPrivacy.ProblemID = problem.ProblemID; problemPrivacy.StaffEmail = currentUserStaffMember.Email; problemPrivacyRepository.Add(problemPrivacy); if (StaffEmail != null) { for (int i = 0; i < StaffEmail.Length; i++) { ProblemPrivacy probPrivacy = new ProblemPrivacy(); probPrivacy.ProblemID = problem.ProblemID; probPrivacy.StaffEmail = StaffEmail[i]; problemPrivacyRepository.Add(probPrivacy); } } problemPrivacyRepository.Save(); return RedirectToAction("Details", "Student", new { id = student.Email }); } catch { ModelState.AddRuleViolations(problem.GetRuleViolations()); } } return View(new ProblemFormViewModel(problem, assessmentExtension, staffMember)); } This form was working correctly before I had to switch to using a non-AJAX file upload, this was due to an issue with Flash when enabling Windows Authentication which I need to use. It appears that when I submit the form the file is not sent and I am unsure as to why? I have also been unsuccessful in finding an example online where a file upload is used in conjunction with other input types. Another query I have is that for Create, and Edit operations I have used a PartialView for my forms to make my application have higher code reuse. The form action is normally generated by just using: Html.BeginForm() And this populates the action depending on which Url is being used Edit or Create. However when populating HTML attributes you have to provide a action and controller value to pass HTML attributes. using (Html.BeginForm("Create", "Problem", FormMethod.Post, new { id = "ProblemForm", enctype = "multipart/form-data" })) Is it possible to somehow populate the action and controller value depending on the URL to maintain code reuse? Thinking about it whilst typing this I could set two values in the original controller action request view data and then just populate the value using the viewdata values? Any help on these two issues would be appreciated, I'm new to asp.net mvc :-) Thanks, Jon

    Read the article

  • User upload file above web root with php

    - by Chris
    I have a website where local bands can have a profile page, I'm implementing an upload system so that they can add songs to their profile. I want to make sure that clever visitors to my website cannot download their songs. I was thinking about uploading them to above the folder for my domain so that they cannot be accessed directly. Is this a good idea and/or possible? If not, what do you suggest I do to try and avoid users downloading songs. I'm already using a flash player to try and prevent downloads.

    Read the article

  • need to add secure ftp file upload area to a client's website

    - by user346602
    This is a variation on a previous question as I am having tons of trouble finding answers in all my relentless online searches. Am designing a website for an architecture firm. They want their clients to be able to upload files to them, through a link on their site, via ftp. They also want to have a sign in for their clients, and ensure the uploads are secure. I can figure out how to make a form that has a file upload area - but just don't understand the ftp and the secure part... I understand html, css and a bit of JQuery; the rest is still very challenging to me. Have found something called net2ftp that claims to do what I'm looking for - but the even the installation instructions (for administrators, here: http://www.net2ftp.com/help.html) confuse me. Do I need a MySQL database? Where do I put in Admin password they refer to? It goes on... Is there anything "easier" out there that anyone knows of? I have read that I should be Googling "file managers" - but don't know if these can be embedded in a client's website. I even need to understand of what happens to said file, and where it ends up, when client clicks the upload link. Oh - I am so in over head on this one.

    Read the article

  • PHP upload file using PUT instead of POST

    - by Marco Demaio
    I read something about this on PHP docs, but it's not celar to me: Do the most widely used browsers (IE, FF, Chrome, Safari, Opera, ...) support this PUT method to uplaod files? What HTML should I write to make the browser call the server via PUT request. I mean do I need to write a FORM with an INPUT file field and just replace the attribute method="POST" with the method="PUT"? On the PHP docs (link above) they say a PUT request is much simplier than a POST request when uploading file, along with this advantage, what other advantages/disadvanatges do the PUT has comapred to teh POST? Thanks!

    Read the article

  • PHP upload with progress bar

    - by Mitchan Adams
    Hi all I want to create an upload form to upload large files. Thats pretty much easy, however, the upload process itself taks long and basically looks like nothing is happening for a few minutes. So now I'd like to insert a progress bar to show the user that something is happening and they should just sit tight. I've read of numerous methods like APC and certian flash plugins, but my site is hosted on a shared server and I cant install any new applications on it. I'm thinking, maybe if it is possible to read the size of the temp file it creates via an ajax page. By polling the size every few seconds I should be able to get the progress of the upload. Now the question I pose is...where is the temp file situated?

    Read the article

  • asp:upload postedfile lost during postback

    - by Neil
    I am using an asp:upload control to upload an image and am using the postedfile property to insert the path to the database. In my form I have a dropdown with autopostback=true where the user can select a topic to populate a checkbox list of categories. During that postback, the postedfile value is being lost and after a little research I have discovered that the posted file value is not maintained in viewstate for security reasons. Has anybody else found out how to get around this?

    Read the article

  • File Upload via PHP and AntiVirus in Linux?

    - by wag2639
    I was wondering, if I was making a file or image hosting/transfer site, whether or not there was a good approach to check for viruses for files that users are uploading? I was thinking of this: Use traditional PHP file upload form to upload the file to the server. Put files in a queue folder Move the queue folder to a "process" folder, and replace queue folder after a predetermined limit (time, cronjob, file count, collective file size) Run a command line virus scan on files in process folder Place safe files in holding area for use Is this a good approach?

    Read the article

  • File upload with Sinatra.

    - by Ethan Turkeltaub
    I am trying to be able to upload files with Sinatra. I have the code here, but I'm getting the error "method file_hash does not exist" (see /lib/mvc/helpers/helpers.rb). What is going on here? Is there some dependency I'm missing.

    Read the article

  • Multiple File Upload asp.net mvc

    - by kusanagi
    is it possible to be able Multiple select files when make browse file? any solution , may be flash. so on form one field type="file" but with it can be upload more then one file i know that can be add on form more then one file field

    Read the article

  • Writing direct to disk with php

    - by Jurander
    I would like to create an upload script that doesn't fall under the php upload limit. There might be an occasion where I need to upload a 2GB, or larger file and I don't want to have to change the whole server execution to above 32MB. Is there a way to write direct to disk from php? What method might you propose someone would use to accomplish this? I have read around stack overflow but haven't quite found what I am looking to do.

    Read the article

  • MVC: Upload image in partial view, routing problem

    - by D.J
    I am trying to upload images via a form which sits in partial view using MVC. View Code: <form action="/Item/ImageUpload" method="post" enctype="multipart/form-data"> <%= Html.TextBox("ItemId",Model.ItemId) %> <input type="file" name="file" id="file" /> <input type="submit" value="Add" /> </form> Action Code: public void ImageUpload(string ItemId, HttpPostedFileBase file) { // upload image // Add Image record to database // Associate Image record to Item record //Go back to existing view where the partial view sits RedirectToAction("Details/"+ItemId); } The Image is uploaded successful All the data manipulation are working as expected However instead of redirect to view "Item/Details/id", page went to "/Item/ImageUpload" I tried several different way of doing this including using jsonResultAction, but all failed in this same result. where did i do wrong, any ideas? thanks in advance

    Read the article

  • django handling file uploads - target different than media folder

    - by Tom Tom
    Hi, I want to enable the user to upload media which will not be saved in the media folder. When I use the following line of code data will be uploaded to media/upload/logo . logo_img = models.FileField(upload_to='upload/logo', blank=True) I'm wondering how I can change this behaviour. I would try to write a custom FileField and a view that serves the data based on the database entries. I do not want to place the data the user uploads to the media folder, since it is no public data. Is this approach correct? Are there solutions out there which do exactly what I want and I would reinvent the wheel with implementing this by myself? Would appreciate any help!

    Read the article

  • PHP File Upload, files disappearing from /tmp before move_uploaded_files

    - by Bowen
    Hi, I have a very basic upload script, probably lifted straight off the php.net/move_upload_files function page. move_uploaded_file() is failed because it cannot find the tmp file in the tmp folder. But I KNOW that it is being put there, but is removed before move_upload_file() can deal with it in my script. I know it is being put there since I can see a file in there when a large file is being posted to the server. Also $_FILEScontains correct details for the file I have just uploaded. Had anyone have any idea why the temporary file is being removed from /tmp before I have a chance to handle it? Here is the basic code that I am using. if(move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_file)) { $result['error'] = 'false'; $result['file_loc'] = $upload_file; } else { $result['error'] = 'true'; } The output of print_r($_FILES) looks like [userfile] => Array ( [name] => switchsolo.png [type] => image/png [tmp_name] => /tmp/phpIyKRl5 [error] => 0 [size] => 6690 ) But /tmp/phpIyKRl5 simply isn't there.

    Read the article

  • File upload using HTML file type.

    - by vaibhav
    I want to upload a file on my aspx page. I am using <form id="frmId" method="post" enctype="Multipart/form-data"> <input type="file" id="file1"/> <input type="submit" id="btnsubmit"/> </form> and in code behind I am trying to get this file. Its not letting me to get the file until I use server side input file control. I don't want to use runat="server" attribute with my file control. Do anyone know how to do this.

    Read the article

  • Determine how many bytes of a request have been read/received?

    - by vdhant
    Hey guys Just wondering if anyone has any idea how you can determine how many bytes of a request have been read/received by the server... In other words how do I stream http request... In that, users are uploading files and I want to report on a perotic basis how many bytes have been read/received so far. Just wondering if anyone has any ideas on how I might do this... Cheers Anthony

    Read the article

  • where from does paperclip get the name of original file?

    - by Pavel K.
    i started using nginx upload module (which creates upload files like /tmp/000121545) but i need paperclip to use original filename while saving files (like /public/avatars/LuckyLuke.jpg) previously in the parameters Rails were passing just "avatar"=>#<File:/tmp/RackMultipart20100413-6151-t3ecq0-0> no original filename as well, so i am wondering where from does it come in paperclip? i tried looking through plugin code but it's currently a bit too complex for me.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >