Skip to content

jinglundong/DataHero-File-Upload-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Upload Demo

Author

Jinglun Dong 

Version

  • v0.2.1 Fixed a bug which is related to regular expression. Fixed a bug when input file is less than 5 words.
  • v0.2.0 Implemented the five most frequent words function. Rewrite the line and word count using Node.js.
  • v0.1.1 If there is no file information update, there is no content reload on browse view.
  • v0.1.0 Added "delete button" back to browse view. Deactivate the ajax call when load index view first time.
  • v0.0.9 Fixed a bug which crashes the server when different users delete files asynchronously.
  • v0.0.8 Seperated server to app server and web server.
  • v0.0.7 Fixed a bug which related to uploading empty directory to github.

AWS DEMO

Description

This demo is based on a jQuery plug-in called "jQuery-File-Upload". 
Two servers needed app server app.js, web server web.js. Web server used express frame work.
File Upload widget with multiple file selection, drag drop support, progress bars and preview images for jQuery.

Features

  • The maximum file size for uploads in this demo is 1 GB.
  • Only text files (.txt) are allowed in this demo.
  • Uploaded files will be saved on public/files.
  • In the browse view, current uploading fils(which are not finish yet) will appears with line and word count unkown.
  • The metadata of uploaded files will be saved on public/meta as JSON format.
  • jQuery.tmpl() is used to update the content on index page.
  • jQuery.ajax is used to update the browse view.
  • Express is used for the web server.
  • Use HashMap and min-heap to calculate the most frequent words, using Node.js.
  • Please refer to the project website and documentation for more information related to jQuery file upload plugin.

How to run

  • For the dependency, please use "$npm install".
  • Create an app server by "$node ./app.js".
  • A web server is also needed, by "$node ./web.js".
  • Open http://localhost:8080/

Problem not solved

  • Only test on Chrome version 22.0.1229.79 and Firefox version 15.0.1.
  • The function which computes the line and word number of uploaded file is not completely asynchronized.
  • If multiple large file(several GB) are uploaded at the same time, the progress bar may not fade out smoothly. One possible reason is calculating number of lines and words leads to huge amount of CPU utilization and I/O for large file.

Git

License

Released under the MIT license.

About

DataHero File Upload Demo based on jQuery File Upload Plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published