title: Working with images in HTML5 offline application?
body: <p>We've successfully created an offline application using HTML5. What it does is store data in indexedDB or in localStorage, when online, the local storage and online database will be synchronized. Everything's fine until we decided to add functionality to upload images.</p>
  
  <p>1) Since the app works offline, we cannot upload images in the server, where are we going to put them?</p>
  
  <p>Possible Solutions:</p>
  
  <ul>
  <li>when offline, save the path, when the user gets online, upload the images by creating input elements and assigning the path to its value attribute. The problem with this approach is that we cannot change value attribute of input element and we cannot get the full path of the image to be uploaded. It seems like this solution is not really possible.</li>
  <li>save the image in indexedDB or localStorage, is this possible?</li>
  </ul>
  
  <p>2) If we successfully save the image in indexedDB or localStorage, how are we going to upload it once the user gets online?</p>
  
  <p>Possible Solutions:</p>
  
  <ul>
  <li>WebSocket - I haven't touch this yet. </li>
  <li>Flash - will it work on iPhone? Probably not.</li>
  </ul>
  
  <p>3) If we successfully saved the image in indexedDB or localStorage, how are we going to display it on the page? Image elements use src attribute to determine which image to display, is there any other methods like using image binary?</p>
  
  <p>If you have faced the same situation before, what workaround did you do to achieve your goal?</p>