- The drag and drop API works really well with the file API.…But this is where things start to get a little bit ugly.…So let's take a look at some of the frustrating things…about how these APIs handle files in relationship…to the problem we're trying to solve.…Now the method we can use for this type of operation…comes from the FileReader API.…And you can see that it has pretty decent…support in modern browsers.…Now if you take a look at the…Mozilla Developer Network documentation,…you'll see that there are several properties…as well as event handlers for this method.…
And the one that we're interested in here…is the FileReader.onloadend event.…We'll use that because it's triggered…each time a reading operation is completed.…Now we're also interested in some of the methods…that will operate on the files.…That's because the method we use will determine…the contents of the file when it's returned.…Notice that all these function…by returning a result attribute.…And it's gonna contain the file in different formats.…
Visit other courses in the series to see how to solve the exact same challenges in languages like C++, C#, Java, PHP, Python, R, Ruby, and Swift.
Skill Level Intermediate
1. Problem One - Exploring Lake Pend Oreille
2. Problem Two: Image Analysis
3. Problem Three: Eight Queens
4. Problem Four: Accessing Peripherals
5. Problem 5 - Recursion and Directories
6. Problem 6 - Building the Web
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.