In this post, I’ll continue to work on the code started in the first article on Feature Detection and File Upload Forms, so you’d better read it before going further.
Last time, we created a Javascript component used to upload a file asynchronously on the server.
It uses FormData
and FileList
APIs in modern browsers but also degrades gracefully with browsers that don’t support those APIs.
This time, I’ll explain how to handle the thumbnail associated to the file input field.
It’s a good example to introduce loosely coupled modules, and to show some other uses of the feature detection technique.