Skip to content

Instantly share code, notes, and snippets.


Fugroup fugroup

Block or report user

Report or block fugroup

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
alediaferia / tiny_uploader.js
Last active Aug 29, 2019
A tiny snippet for reading files chunk by chunk in plain JavaScript
View tiny_uploader.js
* Valid options are:
* - chunk_read_callback: a function that accepts the read chunk
as its only argument. If binary option
is set to true, this function will receive
an instance of ArrayBuffer, otherwise a String
* - error_callback: an optional function that accepts an object of type
* - success: an optional function invoked as soon as the whole file has been
read successfully
falkolab / download.js
Created Jul 30, 2014
Download file by http with progress (NodeJS)
View download.js
function download(fileUrl, apiPath, callback) {
var url = require('url'),
http = require('http'),
p = url.parse(fileUrl),
timeout = 10000;
var file = fs.createWriteStream(apiPath);
var timeout_wrapper = function( req ) {
return function() {
You can’t perform that action at this time.