Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated docs

  • Loading branch information...
commit aa3a96623bd0a83d9cf101accd63c609f47d8635 1 parent cdc309d
Martin Schuhfuss authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 README.md
View
8 README.md
@@ -44,9 +44,11 @@ now take a photo to see if it's working.
## Integrate into your own project
-Integration is possible, but currently not very feature-rich.
+Integration is possible, and not really complicated.
It basically just works (or maybe doesn't) and emits an
`imageReceived`-Event whenever the upload of an image is completed.
+Additionally, you may listen for `uploadProgress`-events which are fired during
+the file-upload.
By default, logging will print error-messages to the console. This is
something I'm working on. (If you want to customize logging, the only way
@@ -66,6 +68,10 @@ for now is to create your own logger-instance (see standalone.js))
eyefiServer.on('imageReceived', function(data) {
console.log('received an image: ' + data.filename);
});
+
+ eyefiServer.on('uploadProgress', function(progress) {
+ console.log( (100*progress.received/progress.expected).toFixed(2) + '% complete');
+ });
## Doesn't work?
Please sign in to comment.
Something went wrong with that request. Please try again.