Skip to content

Commit

Permalink
support file upload by drag and drop
Browse files Browse the repository at this point in the history
  • Loading branch information
tom zhou committed Mar 29, 2015
1 parent ef0f17d commit f8b29c3
Show file tree
Hide file tree
Showing 11 changed files with 390 additions and 22 deletions.
19 changes: 13 additions & 6 deletions bin/peer-vnc
Expand Up @@ -15,12 +15,13 @@ var help = [
"Starts a peer-vnc server using the specified command-line options",
"",
"options:",
" -t, --target localhost:5900,localhost:5901-5918 Host:port pairs of VNC server, the multiple VNC separate by comma",
" -k, --key User key Key for the registered user on ivncbox.com",
" -s --secmode ssl or acl Secure mode: ssl or host-based ACL",
" -a --authmode srv or both SSL auth mode: srv or both",
" -b --basicauth user:pass Http basic-auth as username:password",
" -u, --user USER User to drop privileges once server socket is bound",
" -t, --target localhost:5900,localhost:5901-5918 Host:port pairs of VNC server, the multiple VNC separate by comma",
" -k, --key User key Key for the registered user on ivncbox.com",
" -s --secmode ssl or acl Secure mode: ssl or host-based ACL",
" -a --authmode srv or both SSL auth mode: srv or both",
" -b --basicauth user:pass Http basic-auth as username:password",
" -d --directory /xxx/yy/ File upload directory",
" -u, --user USER User to drop privileges once server socket is bound",
" -h, --help You're staring at it"
].join('\n');

Expand All @@ -33,6 +34,7 @@ var target = argv.t || argv.target,
secmode = argv.s || argv.secmode,
authmode = argv.a || argv.authmode,
basicauth = argv.b || argv.basicauth,
directory = argv.d || argv.directory,
user = argv.u || argv.user;

//
Expand Down Expand Up @@ -88,6 +90,11 @@ if (basicauth) {
console.log('Warning: Please set http auth with -b username:password');
}

if (directory) {
options.upload = directory;
console.log('Warning: File will upload to ' + directory);
}

if (usrkey) {
options.usrkey = usrkey;
}
Expand Down
27 changes: 27 additions & 0 deletions front/bower.json
@@ -0,0 +1,27 @@
{
"name": "peer-vnc",
"version": "1.3.0",
"homepage": "https://github.com/InstantWebP2P/peer-vnc",
"description": "peer-vnc front view",
"main": "spa.js",
"moduleType": [
"node"
],
"keywords": [
"peer-vnc"
],
"authors": [
"tom zhou, iwebpp@gmail.com"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"angular": "~1.3.15"
}
}
2 changes: 2 additions & 0 deletions front/dist/angular-file-upload-shim.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions front/dist/angular-file-upload.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions front/dist/angular-notify.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f8b29c3

Please sign in to comment.