It’s common to Upload a video file using HTML form. But, uploading a video with Progress Bar is the most important feature of the dynamic web application. The video file upload functionality can be easily implemented using PHP. When you…
Expand +Tag: Image upload function
File Upload in Node js using Multer
File Upload in Node js using Multer is an important feature for any web application. Multer is a Node.js or express middleware, that makes it easy to handle multipart/form-data when your users upload files. When a website user uploads a file to a server, it is usually submitted via a form and encoded as multipart/form-data.
Expand +Drag and Drop File Upload using DropzoneJS, PHP & MySQL
Drag and drop file upload is a very successful way to make your web application user-friendly. Generally, this feature allows you to drag an element and drop it to a different location on the web page. The drag and drop…
Expand +Upload and Create Image Thumbnails using CodeIgniter
The capability of uploading and create image thumbnails is one of the most important requirements for most web application developers and Codeigniter provides file upload and file resize feature. The Codeigniter Library for image Upload and Resize Image is very…
Expand +Reduce Image Size Before Upload Using PHP
Reduce Image Size Before Upload Using PHP is an important feature for any web developer.The feature of image uploading is popular in web projects that require users to upload pictures to set the profile picture or to maintain their image…
Expand +Ajax File Upload with Progress Bar using PHP and JQuery
File Upload with Progress Bar, The most key feature of the dynamic web application is the file upload function. PHP can be used to easily implement the file upload functionality. Usually, when you upload a file using PHP, the page…
Expand +jQuery to Preview and Rotate an Image Before Upload using PHP
Preview image functionality can be easily implemented using jQuery before uploading and rotating image element functionality. You can rotate the image at a particular angle and use PHP to upload the image to the server. In this tutorial, we’ll show…
Expand +How to show image thumbnail before upload with jQuery
Now, i am going to Share: How to show image thumbnail before upload with jQuery Step 1:- Put the following code in <body></body> section.
2 3 4 5 |
<div id="previewimg"></div> <input id="upload_file" class="img" name="image" type="file" /> |
Step 2:- Put the script code in <head></head> section.
2 3 4 5 6 7 |
<script src="http://code.jquery.com/jquery-1.10.2.js"></script> <script type="text/javascript">// <![CDATA[ $(function() { $("#upload_file").on("change", function() { var files = !!this.files ? this.files : []; if (!files.length || !window.FileReader) return; // no file selected, or no FileReader support if (/^image/.test( files[0].type)){ // only image file var reader = new FileReader(); // instance of the FileReader reader.readAsDataURL(files[0]); // read the local file reader.onloadend = function(){ // set image data as background of div $("#previewimg").css("background-image", "url("+this.result+")"); } } }); }); // ]]></script> |
Step 3:- Put following CSS…
Expand +