upload

php & jquery upload image and preview display instantly

风格不统一 提交于 2019-11-30 16:26:48
im looking forward to create an upload module where user can browse, click open and it will instantly display a preview of that image without having to click a submit button so that user can continue to key in other information. i've done a simple but incomplete jquery below which basically capture the image name. but my question is how do i post the upload image to the php script since there is there is no submit button for POST? i cant capture $_FILES array values. jquery: $(document).ready(function() { $("#uploadimage").change(function() { var imagesrc = $("#uploadimage").val(); $.post("

Silverlight 4 RC File Upload with Upload Progress: how to?

 ̄綄美尐妖づ 提交于 2019-11-30 16:22:19
It's been stated that one of the new features of Silverlight 4 RC is that it now supports upload progress. I'm assuming this means it's possible to make an upload file progress bar without "chunking" but I can't figure out how to do this, so how do we do this? Source code examples would be great. Thanks! Ok, after lots of playing I've got it figured out: private void UploadFile(string url, CustomPostDataInfo pdi) { // Use the client http stack! //HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url); HttpWebRequest webRequest = (HttpWebRequest)WebRequestCreator.ClientHttp.Create

Save file to Document directory in liferay 6.1 using API

拟墨画扇 提交于 2019-11-30 16:17:37
问题 I need to save a uploaded file in sub directory of Document & Media folder in liferay from web-form portlet. I have extended the web Form portlet to do so, but file is getting uploaded successfully in database & not in Document & Media folder. I tried following code to upload the file in document directory but no success please help . ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); String title = file.getName(); DLFolder dlFolder =

Codeigniter: Image Upload

北城余情 提交于 2019-11-30 15:58:21
I have a large form, and I just added an file input to allow users to upload an image. Here's the new HTML: <input type="file" name="file_1" /> <input type="text" name="image_description_1" class="text-input"/> Here's the new _submit function: if($this->CI->input->post('file_1')){ $config['overwrite'] = TRUE; $config['allowed_types'] = 'jpg|jpeg|gif|png'; $config['max_size'] = 2000; $config['upload_path'] = realpath(APPPATH . '../assets/uploads/avatars'); $this->CI->load->library('upload', $config); $this->CI->upload->do_upload(); $image_data = $this->CI->upload->data(); $image['description']

Replacing normal file upload input with an image

人盡茶涼 提交于 2019-11-30 15:58:05
Bit of a newbie question here. I have a form and one of it's fields is for a file upload. Instead of having the boring old usual text input box with a 'choose file' button beside it, I'd like to have an image which when you click opens the dialog box to browse for the photo. The way I was hoping to be able to do this was with two forms. IE when the user clicks the image a modal box appears with form upload input in it. User chooses file and clicks submit the user is returned to the form. That doesn't seem to work because having a form inside a form must be bad practice i suppose :) Is there a

Upload directly to Amazon S3 using Plupload HTML5 runtime [closed]

懵懂的女人 提交于 2019-11-30 15:52:00
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I saw in one a previous post How do I make Plupload upload directly to Amazon S3?, that this is possible to direct upload from Pluplod Html5 runtime to S3. I tried your approach by hosting my "pluploader" into my

How to limit upload file size in express.js

一个人想着一个人 提交于 2019-11-30 15:40:39
i got this error says error:request entity too large when uploading a video about 30MB, here is the setting code app.use(express.bodyParser({ uploadDir:'./Temp', maxFieldsSize:'2 * 1024 * 1024 * 1024 ', })); am not sure how to set the maxFieldsSize property, need some help!!! Sdedelbrock Express uses connect middleware, you can specify the file upload size by using the following app.use(express.limit('4M')); Connect Limit middleware // Comment sart // app.use(express.bodyParser({ // uploadDir:'./Temp', // maxFieldsSize:'2 * 1024 * 1024 * 1024 ', // })); // Add this code for maximun 150mb app

Go: Tracking POST request progress

半世苍凉 提交于 2019-11-30 15:29:30
I'm coding a ShareX clone for Linux in Go that uploads files and images to file sharing services through http POST requests. I'm currently using http.Client and Do() to send my requests, but I'd like to be able to track the upload progress for bigger files that take up to a minute to upload. The only way I can think of at the moment is manually opening a TCP connection on port 80 to the website and write the HTTP request in chunks, but I don't know if it would work on https sites and I'm not sure if it's the best way to do it. Is there any other way to achieve this? You can create your own io

AngularJS - upload and display image using FileReader API (multiple files) [duplicate]

会有一股神秘感。 提交于 2019-11-30 15:26:44
问题 This question already has answers here : Directive to get files input with ng-model [duplicate] (1 answer) ng-model for `<input type=“file”/>` (with directive DEMO) (12 answers) Closed 2 years ago . I use the following example, it works perfectly , but I'd like to upload multiple images simultaneously. http://jsfiddle.net/kkhxsgLu/2/ <div ng-controller="MyCtrl"> <div ng-repeat="step in stepsModel"> <img class="thumb" ng-src="{{step}}" /> </div> <input type='file' ng-model-instant onchange=

multi file upload with play?

我的梦境 提交于 2019-11-30 15:25:41
I try to upload multiple files with one request. My code looks like the following: <form action="/application/overviewsubmit" method="POST" enctype="multipart/form-data"> <input type="file" name="files"> <input type="file" name="files"> <input type="submit" value="Run..."> </form> And the controller: public static void overviewSubmit(List<File> files){ System.out.println(files); } If both files are set by the user it works. But if the user chooses only one of them and leaves the other one untouched, files is always null. I've found a hackish way. You have to import play.data.Upload or play