

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is HTML5 file Blob.slice() method
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 Questions & Answers
- Usage of HTML5 Blob.slice() method
- What HTML5 File.slice method actually doing?
- HTML5 Canvas to PNG File
- JavaScript File Drop with HTML5
- IE supports the HTML5 File API
- Client Checking file size using HTML5
- What is composition in HTML5 Canvas?
- What is getContext in HTML5 Canvas?
- What is Microdata Vocabulary in HTML5?
- What is a JAR file?
- Remember and Repopulate File Input in HTML5
- HTML5 file uploading with multiple progress bars
- What is meant by HTML5 Web Messaging?
- What is HTML5 IndexedDB and why it is used?
- How to save HTML5 canvas data to file?
Advertisements