
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
What HTML5 File.slice method actually doing?
The HTML5 file Blob.slice() method is useful for creating a Blob object containing the data. This data is in the specified range of bytes of the source Blob.
Let us see an example to send and receive binary data using slice(). This example sends a text and uses the POST method to send the "file" to the server −
var val = new XMLHttpRequest(); val.open("POST", url, true); val.onload = function (event) { }; var blob = new Blob(['demo'], {type: 'text/plain'}); val.send(blob);
- Related Articles
- How to actually work with HTML5 Canvas camera/viewport?
- What is HTML5 file Blob.slice() method
- Usage of HTML5 Blob.slice() method
- What does calling Tk() actually do?
- What Actually UPSC Demands from Aspirants?
- What actually made Apple a trillion dollar company?
- What does opening a file actually do on Linux?
- HTML5 drawImage() method to draw image onto the canvas
- Do any browsers yet support HTML5's checkValidity() method?
- What Are the Different Ways of Doing Branding Through Digital Marketing?
- What are things that hold you back from doing what you really want to?
- What actually travels through the wires when you switch on a light?
- What is composition in HTML5 Canvas?
- What are Character Entities in HTML5
- What is getContext in HTML5 Canvas?

Advertisements