title: How to apply EXIF orientation
body: <p>I noticed that it's not every browser that apply the EXIF orientation. </p>
  
  <p>Chrome on my mobile doesn't apply the EXIF orientation but Safari mobile does.</p>
  
  <p>So since it's not standard, how can I apply the EXIF orientation without applying twice on Safari?</p>
  
  <p>Also I was wondering if it's possible to apply the orientation on the client-side so I don't have to do it after on the server-side (not only an image rotation in javascript). </p>
  
  <pre><code>function handleFileSelect(evt) {
  
  var previewContainer = evt.data.previewContrainer;
  
  evt.stopPropagation();
  evt.preventDefault();
  
  var files;
  if (evt.target.files) {
      files = evt.target.files // FileList object
  }
  else if (evt.originalEvent.dataTransfer.files) {
      files = evt.originalEvent.dataTransfer.files
  }
  
  //if there's a file
  if (files) {
  
      // Loop through the FileList and render image files as thumbnails.
      for (var i = 0, f; f = files[i]; i++) {
          var orientation = 0;
  
          // Only process image files.
          if (!f.type.match('image.*')) {
              continue;
          }
  
          //EXIF.getData(f, function () {
          //    orientation = EXIF.getTag(this, "Orientation");
          //    alert(orientation);
          //    alert(EXIF.pretty(this));
          //});
  
          createReader(f, previewContainer);
  
      }
  }
  }
  </code></pre>