本帖最后由 wzu_xiaomai 于 2014-05-08 01:06:35 编辑

解决方案 »

  1.   

    JS能实现吗?flash也许可以!
    你可以去web开发板块问问!
      

  2.   

    java 还好实现。js 牵涉操作本地文件,不太方便
      

  3.   

    RandomAccessFile不知道可以不,你可以试一试,要是js的话,有点难度
      

  4.   

    大家可以看看这篇文章!http://www.zhangxinxu.com/wordpress/?p=3754
      

  5.   

    用file.slice(start, end)方法分割文件
    详见http://www.w3.org/TR/FileAPI/#slice-method-algo给个例子
    // obtain input element through DOM
        
        var file = document.getElementById('file').files[0];
        if(file)
        {
          // create an identical copy of file
          // the two calls below are equivalent
          
          var fileClone = file.slice(); 
          var fileClone2 = file.slice(0, file.size);
          
          // slice file into 1/2 chunk starting at middle of file
          // Note the use of negative number
          
          var fileChunkFromEnd = file.slice(-(Math.round(file.size/2)));
          
          // slice file into 1/2 chunk starting at beginning of file
          
          var fileChunkFromStart = file.slice(0, Math.round(file.size/2));
          
          // slice file from beginning till 150 bytes before end
          
          var fileNoMetadata = file.slice(0, -150, "application/experimental");      
        }
      

  6.   

    可以使用flex或者sl开发个小的上传组件,里面获得字节数等比较容易,再加上js的回调就可以实现。