<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    1. Backend:<br>
    &nbsp;&nbsp;&nbsp; (1)API definition:<br>
    &nbsp;&nbsp;&nbsp; POST /storagepools/isos/storagevolumes/upload {'file':
    fileobject} -- This is from backend view, as cherrypy's embedded
    support wraps fileobject.<br>
    &nbsp;&nbsp;&nbsp; REF:<tt><big><big><a class="moz-txt-link-freetext" href="http://docs.cherrypy.org/en/latest/pkg/cherrypy.tutorial.html?highlight=upload">http://docs.cherrypy.org/en/latest/pkg/cherrypy.tutorial.html?highlight=upload</a></big></big></tt><tt><big><br>
        <br>
        &nbsp;&nbsp; (2) implementation:<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; We can get the file handler from cherrypy's embedded
        scheme, and use it to read and write to a local file, ref:<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a class="moz-txt-link-freetext" href="https://groups.google.com/forum/#!topic/cherrypy-users/xGvxBGgQ90k">https://groups.google.com/forum/#!topic/cherrypy-users/xGvxBGgQ90k</a><br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The only thing we need to concern at backend is the file
        size, cherrypy demo has proposed a example leverage cgi lib:<br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a class="moz-txt-link-freetext" href="http://tools.cherrypy.org/wiki/DirectToDiskFileUpload">http://tools.cherrypy.org/wiki/DirectToDiskFileUpload</a></big></tt><br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
    <br>
    2.&nbsp; For UI, we need to supply user with a form which input type is
    'file', or we construct formdata in ajax(for IE only supported in
    IE10+):<br>
    &nbsp;&nbsp;&nbsp; REF: <tt><br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a class="moz-txt-link-freetext" href="http://stackoverflow.com/questions/6974684/how-to-send-formdata-objects-with-ajax-requests-in-jquery">http://stackoverflow.com/questions/6974684/how-to-send-formdata-objects-with-ajax-requests-in-jquery</a><br>
      <br>
      <big>3. To support the progress bar in UI, we can utilize
        resumable js: </big></tt><a class="moz-txt-link-freetext"
      href="http://github.com/23/resumable.js">http://github.com/23/resumable.js</a><br>
  </body>
</html>