- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Usage of HTML5 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 use 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
- What is HTML5 file Blob.slice() method
- Usage of autofocus HTML5 attribute
- HTML5 Modernizr Usage
- Attributes and usage of element in HTML5
- Attributes and usage of element in HTML5
- What is the usage of the cross-origin attribute in HTML5?
- MySQL concat_ws() method usage
- Usage of element() method of Queues in Java
- Write the usage of split() method in javascript?
- What is the usage of join() method in JavaScript?
- What is the usage of every() method in JavaScript?
- What is the usage of fill() method in JavaScript?
- What is the usage of copyWithin() method in JavaScript?
- What is the usage of some() method in JavaScript?
- What is the usage of Array.Every() method in JavaScript?

Advertisements