yarn add angularjs-slider Typescript Support. Using PHP, you can easily reduce the file size of those uploaded images during time of upload. Navigate to portal and create a new storage account; Create a container and provide required access level; Copy Access Key from portal. Hello I am trying to crop my image and upload a image using ng-file upload in angularjs. We are using XML less configurations. Example of Angular Maps with Markers A simple jsfiddle example of embedding a google map class with markers to calculate long and lat positions. Using grunt and bower with bootstrap and angular, feat. all the examples I can find are for wraping jQuery plugins for drag & drop. Upload Files or Images to Server Using Node. Any themes built with ThemeRoller will also style tooltips accordingly. AngularJS is what HTML would have been, had it been designed for building web-apps. Since I'm all about Angular lately, I figured it would be great to show how to upload images (or any file) to a back-end. This was just a basic example of File upload to point you towards the right direction. AngularJS - HTML enhanced for web apps! Contribute to angular/angular. From a wide range of exterior signs, including site signage, sail flags, avenue banners, model IDs, trailer wraps and more, to interior displays for the model center,. I figured I should start with input type="file", but then found out that AngularJS can't bind to that. Step 1: Creating an HTML form to upload the file. Angularjs Directive to rotate image base on EXIF orientation value - imgOrientation. jQuery file upload control uploads large files to a server with low server memory consumption. A simple drag/drop upload directive for AngularJS 07 Sep 2015 von Christian Grobmeier As I found out, DropzoneJS doesn't fit all my needs when I work with AngularJS. Inline images are not supported in Internet Explorer 5-7, although version 8 reportedly supports them. If you want to have quick view and to jump to action, please see here. The server side operation consists in sending the binary file string to the postUrl. textAngular is a super cool WYSIWYG Text Editor directive for AngularJS. js vs Ember. This repo is a todo app using Vue and the Buefy framework. From range sliders to date selectorsto submit buttons, the element covers a lot of different cases. js and AngularJS. Upload your image to some image uploading service for example postimage. Before upload the file, it will check whether Directory (Folder) exists if not then the Directory (Folder) will be created and then the file will be uploaded. This week I was in the need to add the functionality of file upload to an AngularJS web application, on which I’m working for a personal project. HTML5 canvas element has the ability to use the images. In the case of uploading an image, it is highly likely the user is uploading a photo straight from their digital camera. Ich weiß, dass dies ein später Eintrag ist, aber ich habe eine einfache Upload-Direktive erstellt. Let's see a working example: Try the AngularJS Image Cropper on JSBin Download Download Angular Image Crop on Github Browser Support. I'm new to AngularJS and don't feel comfortable at all with writing my own directives. Bower $ bower install --save angularjs-slider or. The ng-src directive makes sure the image is not displayed wrong before AngularJS has evaluated the code. Map() creates a new Google maps object. The main problem I meet while coding function upload file in a AngularJS single-page application is we need to convert files from file input into base64 encoded models. How to do it? First create a div element and assign an ID to it. js multer module to configure an upload directory and register a POST request express. File Upload is not as difficult as some people assume it to be. Using PHP, you can easily reduce the file size of those uploaded images during time of upload. I found the angular-upload library to which makes reference. Welcome on infinityknow. We will see the Simple example about what is Routing and how to configure and work with it. Now let's implement the file uploading feature. Let's see a simple example to upload file using Spring MVC. What Are RESTful Web Services? RESTful web services are built to work best on the Web. In this video I show you how to implement file upload with a simple Node. All code belongs to the poster and no license is enforced. form, created by M. This example assumes you are already comfortable with AngularJS, node. It's a combination of a simple-to-use interface with advanced and efficient image/canvas editing techniques. I need to upload an image taken from my mobile device to my server. All code belongs to the poster and no license is enforced. AngularJS To S3 Upload Demo. Resize an Image Using Canvas, Drag and Drop and the File API Building Resilient Systems on AWS : Learn how to design and implement a resilient, highly available, fault-tolerant infrastructure on AWS. Admin web application template with Bootstrap 3 and AngularJS. Display animated images by clicking on Preview Image. Now with angularjs2 and TypeScript to put it bluntly, there is no more scope…or controllers. NET Web API service via a form object by client side. File Upload - TypeScript. To use them, be sure you have the angular type definition peer dependency installed. i am providing simple steps to image or file upload , I am assuming that you have already submitted the form using angular js, i have provided all steps in my previous tutorial. Install with Bower Install with NPM View Source on Github {{doc | humanizeDoc | directiveBrackets:doc. KenBurns, Slide, Fade, Zoom effects and some flat skins are available (more coming soon). upload an image with the title or department name it belongs to). Your plugin for one of our team tools might be of great use to millions of users. e similar to for loop. Today, I'm going to show you how to do something that—until the last while—has been almost unprecedented: uploading files via AJAX. The maximum file size for uploads in this demo is 999 KB (default file size is unlimited). To run this example, you need to load: Spring Core jar files; Spring Web jar files; commons-fileupload. ) This article explains the following in detail: Select Image details from the database using EF and WEB API. I want to upload an image from local machine and want to read the content of the uploaded file. Default Example. It's actually pretty simple and only involves these steps. net C# web project where I had to add multiple images and then drag/shuffle all the images inside a canvas then save and upload this image using jQuery ajax, and give the print command to make Mug Sticker, Tshirt Sticker. Whenever we upload a file more than size of 30GB, we face a problem of Request time out, because mostly large files take around more than 30 Minutes to upload file and hence, it will fail to upload. For this tutorial, we'll create a simple form that has a file upload field, which binds with a controller to get the data from the form. Create dynamic PDF content. The goal of this is as given in the title. net or angularjs upload multiple files / images with progress example in asp. This one supports and lets the user select multiple files to upload and each file will be tracked, which is based on its upload progress. jQuery to show loading image while page loading in jQuery or show loading image in webpage while page loading instead of blank page in jQuery ASP. Luckily, I found https. Check out the JSFiddle. The most basic form field. In today's post i've tried to capture some recent demos of using Angularjs to upload images (and uploading files) ideally in modules or directives which you can plug straight into your web apps. js end point. To see the view, controller, directive, and service working together in their entirety, check out the small fiddle I made. There is a time for each project when internationalization becomes absolutely needed. ) For hosting examples, see JS Bin, JsFiddle and bl. infragistics. ) This article explains the following in detail: Select Image details from the database using EF and WEB API. reeds Drag drop lists with Angular Bootstrap 4 bootstrap4 Bootstrap 4 Login Form skelly ProductHunt style user image hover snippets Bootstrap 4 credit card payment form bootstrap4 Bootstrap 4 Navbar Always Collapsed (beta) tomcat CSS colorize filters snippets Amazing sketchJs animation demo mayberry Bootstrap 4 overlay card skelly Vue Chart. js (#1), jQuery File Upload offers you a very similar bunch of options to fit your needs (albeit with a different UI), as well as prefabricated integrations for jQuery UI and AngularJS. Whenever we upload a file more than size of 30GB, we face a problem of Request time out, because mostly large files take around more than 30 Minutes to upload file and hence, it will fail to upload. In this post I'll show you how to upload a file in AngularJS. AngularJS • Google's open-source framework for developing Web applications • Target is creating single-page web applications with MVC capability • 100% JavaScript and 100% client side • Updates very often (about 4 times a month, 1st version June 2012) • Supports modern desktop and. I purchased this package and had to fix many things for a LAMP setup, and integrate into existing code. This plugin is built with Twitter's Bootstrap toolkit and Icons from Glyphicon. Please select image file. The above created doUpload function does the upload functionality using the AngularJS upload directive. AngularJS PHP - upload and display image using FileReader with example. Get an ad-free experience with special benefits, and directly support Reddit. The value you return here will be used to sort on, so you could combine any properties on the contact object to do the sorting. I have assigned ID as "dvLoading". Resize Image : For example, here's how simple it is to resize your image using ImageMagick in PHP. This example uses an XML-like syntax called JSX. About HTML Preprocessors. Easy to use Angular directives for user file selections ()This package is to handle select/drag/drop of files. The upload function is divided into two asynchronous operations: client side, the file is loaded in the browser memory with a FileReader object. W3Schools is optimized for learning, testing, and training. Resize an Image Using Canvas, Drag and Drop and the File API Building Resilient Systems on AWS : Learn how to design and implement a resilient, highly available, fault-tolerant infrastructure on AWS. Upload Files and images Images¶. ng-book - The Complete Book on AngularJS [Ari Lerner] on Amazon. Create dynamic PDF content. From a wide range of exterior signs, including site signage, sail flags, avenue banners, model IDs, trailer wraps and more, to interior displays for the model center,. The map coordinates are set in the order: latitude , longitude. reeds Drag drop lists with Angular Bootstrap 4 bootstrap4 Bootstrap 4 Login Form skelly ProductHunt style user image hover snippets Bootstrap 4 credit card payment form bootstrap4 Bootstrap 4 Navbar Always Collapsed (beta) tomcat CSS colorize filters snippets Amazing sketchJs animation demo mayberry Bootstrap 4 overlay card skelly Vue Chart. This article will illustrate how to upload multiple files with the standard FileUpload element using HTML5 and AngularJS in ASP. Example of Angular Maps with Markers A simple jsfiddle example of embedding a google map class with markers to calculate long and lat positions. AngularJS: Export html table to PDF, Excel or Doc formats. I want a simple upload of one file. Jquery select2 ajax autocomplete example with demo in PHP. Example of initial files for ASP. Join today to get access to thousands of courses. Preview Image before uploading Angularjs Hi I was wondering if there was a way to preview images before I upload them using angularjs? I am using the this library. Get comprehensive tutorials, FAQ's, quick fixes and solutions on Web Development, Mobile Application development with step by step expert guidance only on tutorialsplane now!. This sample uses CTP (Community Technical Preview) features. Angular js Directive for simple image uploading. In this example Upload Files is a button which is used to upload all the files in the multiFiles array, when this button is clicked uploader. and show image from database I have converted byte image data to ToBase64String. For example, jQuery can be used for finding an element in the document with a certain property (e. Bootply is a web-based editor that you can use to design, test, debug and prototype Bootstrap. Hello Readers, In this tutorial I will explain how to upload image in angular2. net c# and vb. Note: Since I am using FormData in my example here, I want you to know, that Internet Explorer 9 and its previous versions does not work with FormData. As an example, here are five screenshot images for an app:. For example, jQuery can be used for finding an element in the document with a certain property (e. Another example, which I have implemented in my Asp. The following resume samples and examples will help you write a Front End Developer resume that best highlights your experience and qualifications. Hope this would help those who would like to start with it (AngularJS Ui-router). I use Node. 29 September 2019 A todo app using Vue and the Buefy framework. js, without writing a single line of server. It's very simple. Angularjs http put ($http. Create beautiful image sliders entirely in CSS. For example, if a user was editing their profile and uploaded an image, you could store the new image URL from Cloudinary in your database. AngularJS can then check the value returned against the value the watch function returned the last time. The main problem I meet while coding function upload file in a AngularJS single-page application is we need to convert files from file input into base64 encoded models. Tom Trenka on August 6, 2013. i am providing simple steps to image or file upload , I am assuming that you have already submitted the form using angular js, i have provided all steps in my previous tutorial. View images that were uploaded to Firebase in a sleek grid format comparable to Imgur or Facebook. If you're looking for AngularJS or Angular 1 related information, check out r/AngularJS. File upload - how to / examples? because I can use the various upload techniques. many videos are skipping in angularjs. phoneUS – Validate for valid US phone number. Angularjs Directive to rotate image base on EXIF orientation value - imgOrientation. Videogular is an extremely flexible tool that works really well with both AngularJS and Cordova/Phonegap applications. NET MVC By Brij Mohan This article explains how to implement carousel image gallery with AngularJS UI Bootstrap and Entitiy Framework database first approach in ASP. AngularJS - HTML enhanced for web apps! Contribute to angular/angular. Files upload faster compared to the traditional way, which we followed earlier in ASP. JavaScript Image Upload Posted: 4 July 2013. This sample demonstrates how create an Upload Control using an AngularJS directive. JSFiddle or its authors are not responsible or liable for any loss or damage of any kind during the usage of provided code. Imgedit is a small plugin to edit an inline image, what does this plugin do is make an image editable by clicking on it and uploading a new one with a preview (it replaces the original clicked image) then the plugin adds a file input to the target form. Tutorialspoint. Tag: angularjs,canvas,amazon-s3,upload,ng-file-upload. I want to upload an image from local machine and want to read the content of the uploaded file. infragistics. Bug tracker Roadmap (vote for features) About Docs Service status. Here, I will document the simplest way to upload file using AngularJs and ASP. Donate $5 to cdnjs via Bountysource, Open Collective or Patreon, or contribute on GitHub to make cdnjs sustainable! Twitter Discourse. Onlinebuff is a blog by gurunatha dogi, which covers technical topics and interview questions on c#, asp. Typescript definition files are provided with this project. Upload service: If you return other formats from the endpoint you can specify resumeSizeResponseReader function to return the size value from the response. Show File(s) information. Try out html2canvas. In this article, I would like to share, how can we upload a file and validate that file, firstly at client side and after that at server side. This small example shows branching works within HTML documents and how CSS selectors traverses the tree using the simple parent/sibling relationships. Reload to refresh your session. In the fiddle, the file upload function is invoked on the click of the button, but of course it can be called anywhere in your controller. The nice thing about this course is that it also incorporates learning about using CSS to format your pages 10 Simple CSS Code Examples You Can Learn in 10 Minutes 10 Simple CSS Code Examples You Can Learn in 10 Minutes We'll go over how to create an inline stylesheet so you can practice your CSS skills. In this post, we will learn about Image Upload with Validation in Angular 6 with an example. AngularJS 1. 10px gap is not found on the jsFiddle because, they use CSS Reset. Animations perform well even on mobile devices. Creating the template. upload an image with the title or department name it belongs to). Add a Canvas. AngularJS implements the MVC pattern to separate presentation, data, and logic components. I’ve had quite a lot of requests for how to upload images using Ajax and show a thumbnail so I decided to do a quick demo to show you how it can be done. All code belongs to the poster and no license is enforced. They all required you to maintain state on behalf of the progress bar, setting its position manually. In this tutorial we will upload images to server in a folder and also insert into MySQL database table. It's perfect for freelancers who need to receive files like logos and design assets from their clients, or for human resources departments to receive job applications from applicants. $ npm install ui-select Install via bower $ bower install angular-ui-select. Tip: Check out the Store Locator solution to see more comprehensive examples of using custom markers to visualize data on a map. Note in many cases this will not work. For example, if a user was editing their profile and uploaded an image, you could store the new image URL from Cloudinary in your database. So the initial preview is always displayed when additional files are overwritten (useful for multiple upload) scenario. In this article, I would like to share, how can we upload a file and validate that file, firstly at client side and after that at server side. For example, if a user was editing their profile and uploaded an image, you could store the new image URL from Cloudinary in your database. This is a revised post based on the popular original article found at Uploading To S3 With AngularJS The content is similar other than a few key steps which have been removed/altered but for the sake of clean reading, I thought I would create a new post for it. AngularJs access complex nested JSON object: Here in this article we learn how to display all the nested JSON data using nested ng-repeat directive into our HTML table on a button click. This page gathers resources about HTML5 image upload including tutorials and examples. Since my project also uses jQuery, I found that the better solution to build an asynchronous file uploader was to rely on the well known (and wonderful) jQuery plugin jquery. net using c#, vb. Bootply is a web-based editor that you can use to design, test, debug and prototype Bootstrap. 29 September 2019 A todo app using Vue and the Buefy framework. The image will be displayed directly from the HTML Input FileUpload using the DXImageTransform filter CSS property and HTML5 FileReader API. We will see the Simple example about what is Routing and how to configure and work with it. AngularJS - Filters - Filters are used to modify the data. Whereas if you set the overflow value to hidden, the image will cut off at 200px. If you find any other decent Angularjs image upload demos please do leave a comment. Additionally it prevents the default action (which for form means sending the request to the server and reloading the current page), but only if the form does not contain action, data-action, or x-action attributes. Spring 3 MVC multiple file upload tutorial with example. About This Book From the author of the bestselling AngularJS Web Application Development Cookbook. In AngularJs the ng-repeat directive is used to loop through items in collection element. Angular is known for its powerful two-way data-binding, but with the new release of AngularJS 1. (Small code snippets are okay. In this blog post, I'd like to explain how to upload image to the Azure Blob storage from Angular 4 SPA application and Azure Functions HttpTrigger Node. If you want to play around or get some easy open source experience, feel free to submit a PR!. org, onlinecode, Learning, PHP, Programming, Language, Built-in Function, Library, Web Design, Object Oriented PHP, PHP Variables, Scalars, Arrays, Hash. Another example, which I have implemented in my Asp. How to do it? First create a div element and assign an ID to it. You can select the file (image) and click Upload button. 5 AngularJS Image Upload Demos. Admin web application template with Bootstrap 3 and AngularJS. In this article, I would like to share, how can we upload a file and validate that file, firstly at client side and after that at server side. Photo Gallery with AngularJS and CSS3 Today I will show you the process of creating photo slider with AngularJS and CSS3. jsFiddle Demo. Image preview example - mdn. All code belongs to the poster and no license is enforced. NOTE: We are using a file upload example found on the-internet. AngularJS implements the MVC pattern to separate presentation, data, and logic components. Example of uploading file to the server in servlet. To see the view, controller, directive, and service working together in their entirety, check out the small fiddle I made. Angularjs http put ($http. We drag files from one folder to another, text from one area of a document to another, and PowerPoint slides from one place in the presentation to another. This sample uses CTP (Community Technical Preview) features. Blueimp jquery file upload has multiple features like:. Consequently, much of the burden on the server can be reduced. Can I get your opinion on the reason you would want to do this, beyond just "I have a lot of controllers"?. Bug tracker Roadmap (vote for features) About Docs Service status. For technical discussions, a link to a small, working example is far more helpful than pasting large chunks of code into email. NOTE: We are using a file upload example found on the-internet. If you add a project, please commit to keeping it up to date with. Here in this tutorial we are going to explain how you can reload a page using AngularJs. View images that were uploaded to Firebase in a sleek grid format comparable to Imgur or Facebook. Plupload is based on multi-runtime pollyfills for XMLHttpRequest L2, File and Image APIs. A PersonGroup can hold up to 10,000 persons based on the previous design limitation. My note below on general file uploading was an early hint of some of the system default limitations and I have recently discovered the final limit I offer this as an example of the various missing pieces of information to successfully load images of more than 2MB and then create thumbnails. According to the specifications of HTML5, a file upload control should not reveal the real local path to the file you have selected, if you manipulate its value string with JavaScript. Ver más: angular file upload, angularjs file upload validation, angularjs file upload example jsfiddle, upload and display image in angularjs, angularjs image upload with preview, angularjs image upload example, image upload using angularjs, angularjs image upload demo, add upload image function website, upload avec preview images, pop contact. Declarative templates with data-binding, MVW, MVVM, MVC, dependency injection and great testability story all implemented with pure client-side JavaScript!. Net, uploading a physical file using the file upload control is very easy. The Script facilitates the process of. If you want to have quick view and to jump to action, please see here. Please make sure that if you use this code you create an appropriate IAM account policy to prevent mis-use. Background. We will have a sample project having a form to upload a file and once the file is uploaded, we will be displaying the same in a table with a download button and whenever this button is clicked the image will be downloaded in the browser. So the developer should write the code to reduce the image file size while uploading the image dynamically to the website. html for more concrete examples. In this post, we will learn about Image Upload with Validation in Angular 6 with an example. A nice collection of often useful examples done in Vue. Offering more payment options should increase sales. React components implement a render() method that takes input data and returns what to display. net using c#, vb. This how-to shows you how to setup a project using AngularJS and tinymce. Net, along with other technologies such as Web API, HTML5 and JQuery etc. It consists of a button, some contents or message for user. NET MVC - Using Resource Files to Manage String Constants. If you have your own payment infrastructure for example, you can extend the shopping cart to use that in addition to the PayPal and Google Wallet options. Fortunately, the new HTML5 SDK is capable of uploading local images or captured images to web servers. Here, I will document the simplest way to upload file using AngularJs and ASP. There is a time for each project when internationalization becomes absolutely needed. Net MVC Razor. Thus we have seen how to upload files using NodeJS and AngularJS. Learn how to use the native device camera in your Ionic Framework Android and iOS mobile application to take pictures and synchronize them with Firebase. Range slider with min limit set to 10 and max limit set to 90 Range slider with a minimal range set to 10 and maximum of 50 Range slider with restricted area from 30. angularjs multiple file upload example jsfiddle (4) If you want to handle multiple files, try this. Why is This? There are so many libraries to do this online. com We are providing an example of Upload File. Playing with Maps using AngularJS The talk covers basic Maps API following by the use of AngularJS to create a Maps application. File Upload is not as difficult as some people assume it to be. Once files are selected, for uploading, you then use Angular's @angular/common/http for uploading selected files (see here for more on uploading). 위의 대답은 브라우저와 호환되지 않습니다. Browser vendors have recently ruled that getUserMedia should only work on https: protocol. Note: Since I am using FormData in my example here, I want you to know, that Internet Explorer 9 and its previous versions does not work with FormData. e similar to for loop. Native AngularJS implementation, no jQuery Performs well with large data sets; even 10,000+ rows Plugin architecture allows you to use only the features you need. This sample demonstrates how create an Upload Control using an AngularJS directive. In this tutorial we will create an AngularJS web app that will upload the user selected file to server using nodejs. 15 Comments. express multer body-parser We will briefly explain the use of these packages. js Marketing & PR Infragistics. The best free forms snippets available. Document your code. AngularJS - Drag Application - We are providing an example of Drag app. NET Web API service via a form object by client side. A really SIMPLE and clean AngularJS+Firebase example Using AngularJS in Eclipse, Part 1) The Basics Using AngularJS in Eclipse, Part 2) Add Some Control Using AngularJS in Eclipse, Part 3) Wire up a Backend Using AngularJS in Eclipse, Part 4) Create Components AngularJS code editor using UI-Bootstrap and CodeMirror (done without using jQuery). Background. put) is used to upload files to server based on defined url and we can. net to upload multiple files with progress bars. In this article, we will look at the element and how it helps in responsive design to render images of different sizes, based on the physical device accessing the content. html for more concrete examples. The center property tells the API where to center the map. (In my example I have used Visual Studio Community 2015 RC. Currently, all screenshots are downscaled to 640x400 pixels. Software Used To run the file upload demo in Spring 4, get ready with below software. To display an image in our HTML pages, we have so far made use of the element with the source [src] attribute. Creating the template. Use base64 as image sources. To see working examples of using Knockout to create responsive UIs, choose from the menu on the left. You can use location. For front-end code write in AngularJS and back-end code write in PHP(for image upload code). The idea behind it is to let the user add his / her photos. AngularJS is what HTML would have been, had it been designed for building web-apps. The best free calendar snippets available. Example code for Firebase with AngularJS to upload a image. I had a few customers asking how to create an application that can upload images from AngularJS without a backend App, so I decided to go ahead and create a sample application with this implementation. js, including tutorials and code examples. JSFiddle or its authors are not responsible or liable for any loss or damage of any kind during the usage of provided code. Let clients upload images to your website. So these are the 5 AngularJS Image Upload Demos. (Small code snippets are okay. AngularJS 1. Net, uploading a physical file using the file upload control is very easy. Part 8 - How to upload files with AngularJS and ASP. all the examples I can find are for wraping jQuery plugins for drag & drop. AngularJS - Display Default image if original image does not exists with example; How to remove # from URL in AngularJS? AngularJS - simple image upload with preview example in PHP; How to hide div after some time using AngularJS? How to change date format using date filter in AngularJS? AngularJS - How to Limit String Length using Filter?. Answers for your valid questions! :P. Declarative templates with data-binding, MVC, dependency injection and great testability story all implemented with pure client-side JavaScript!. *FREE* shipping on qualifying offers. Here I have written a simplified tutorial for uploading images with php backend also we have used camera plugin as image picker and cordova-plugin-filetransfer plugin for connecting remote server. This is the most popular module, which offers 1 directive: Just place this directive anywhere you want the cropping to happen, e. JSX is optional and not required to use React. The @FormDataParam("file") annotation is used to mention file parameter in the service class. This sample is designed for a larger screen size. We will have a sample project having a form to upload a file and once the file is uploaded, we will be displaying the same in a table with a download button and whenever this button is clicked the image will be downloaded in the browser. The Angular File Upload is a component for uploading one or multiple files, images, documents, audio, video, and other files to a server. - AngularFireUpload. (Small code snippets are okay. Learn how to use the native device camera in your Ionic Framework Android and iOS mobile application to take pictures and synchronize them with Firebase. js end point. It's very simple. Here, I will document the simplest way to upload file using AngularJs and ASP. If you're looking for a quick solution, there's a great collection of. JSFiddle or its authors are not responsible or liable for any loss or damage of any kind during the usage of provided code. pdf, doc, excel or any image files like png and gif using HTTP POST method and FormData.