{"id":16073565,"url":"https://github.com/phstc/uploader_nodejs","last_synced_at":"2026-05-19T09:31:50.498Z","repository":{"id":3605568,"uuid":"4670276","full_name":"phstc/uploader_nodejs","owner":"phstc","description":"It's a file upload with progress and credential checker implemented in Node.js","archived":false,"fork":false,"pushed_at":"2012-06-25T14:18:27.000Z","size":252,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T08:45:27.664Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://superuploads.herokuapp.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phstc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-15T01:10:49.000Z","updated_at":"2014-05-13T11:27:56.000Z","dependencies_parsed_at":"2022-08-29T14:11:54.392Z","dependency_job_id":null,"html_url":"https://github.com/phstc/uploader_nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstc%2Fuploader_nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstc%2Fuploader_nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstc%2Fuploader_nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstc%2Fuploader_nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phstc","download_url":"https://codeload.github.com/phstc/uploader_nodejs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244931585,"owners_count":20534009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-09T08:21:27.213Z","updated_at":"2026-05-19T09:31:50.455Z","avatar_url":"https://github.com/phstc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"It's my solution to the Code Challenge [File Upload with Progress](https://github.com/phstc/uploader_nodejs/blob/master/BackendDeveloperChallengeUpdated.pdf).\n\nI decided to split this project into small projects, the [Uploader in Node.js](https://github.com/phstc/uploader_nodejs) and the [Uplader client in Rails](https://github.com/phstc/uploader_rails). It's a kind of System of Systems, Node.js fits better for the upload (event-driven, non-blocking I/O) and Rails fits better for the client (gems, community, maturity etc).\n\n[![Build Status](https://secure.travis-ci.org/phstc/uploader_nodejs.png)](http://travis-ci.org/phstc/uploader_nodejs)\n\n##Upload progress\n\nWhen a client sends an upload request, it needs to send a socketid parameter.\n\n    /upload?socketid=...\u0026security_hash=..\u0026timestamp=..\n\nThis socketid parameter is the ID generated from the [socket.io](http://socket.io/).\n\n    var socket = io.connect(...);\n    \n    socket.on('connect', function () {\n    var formAction = \"/upload?socketid=\" + socket.socket.sessionid;\n    $(\"#form_upload\").attr('action', formAction);\n\nSee a full example at [github.com/phstc/uploader_nodejs/blob/master/public/index.html](https://github.com/phstc/uploader_nodejs/blob/master/public/index.html).\n\n###Status\n\nThe Uploader will update the status to client in three channels: ```upload_percentage```, ```uploaded_file``` and ```upload_error```.\n\n    'uploaded_file', {path: file.path, name: file.name}\n    \n    'upload_percentage', percentage\n    \n    'upload_error', 'invalid credential'\n\n##Credential\n\nTo validate if the upload request is from a valid client, the upload request must pass a ```security_hash``` and ```timestamp```.\n\nThe ```security_hash``` is ```md5(SECRET_KEY + timestamp)```.\n\n##Running it\n\n    $ make server\n\n###Test suite\n\n    $ make test\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphstc%2Fuploader_nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphstc%2Fuploader_nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphstc%2Fuploader_nodejs/lists"}