{"id":16959176,"url":"https://github.com/wewoor/h5uploader","last_synced_at":"2026-02-27T19:04:32.398Z","repository":{"id":31600475,"uuid":"35165352","full_name":"wewoor/h5uploader","owner":"wewoor","description":"This is a simple file upload plugin depends on HTML5. You can use it to mordern browser.","archived":false,"fork":false,"pushed_at":"2020-05-25T03:08:25.000Z","size":10545,"stargazers_count":47,"open_issues_count":8,"forks_count":28,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-20T19:04:05.541Z","etag":null,"topics":["html5","javascript","mordern-browser","uploader"],"latest_commit_sha":null,"homepage":null,"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/wewoor.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":"2015-05-06T15:00:10.000Z","updated_at":"2023-04-11T15:17:57.000Z","dependencies_parsed_at":"2022-08-26T10:00:53.999Z","dependency_job_id":null,"html_url":"https://github.com/wewoor/h5uploader","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/wewoor%2Fh5uploader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wewoor%2Fh5uploader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wewoor%2Fh5uploader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wewoor%2Fh5uploader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wewoor","download_url":"https://codeload.github.com/wewoor/h5uploader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244971686,"owners_count":20540832,"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":["html5","javascript","mordern-browser","uploader"],"created_at":"2024-10-13T22:44:26.522Z","updated_at":"2026-02-27T19:04:27.380Z","avatar_url":"https://github.com/wewoor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTML5 file uploader\n\nThis is a simple file upload plugin depends on HTML5. You can use it to mordern browser.\n\n## Install\n\ninstall by bower:\n\n```\nbower install h5uploader --save\n```\nor: \n\n```\ngit clone https://github.com/wewoor/h5uploader.git\n```\n\n## Example\n\nImport this script in you html page:\n\n```html\n\u003cscript type=\"text/javascript\" src=\"h5uploader.js\"\u003e\u003c/script\u003e\n```\n\n### html\n\n```html\n\u003cinput type=\"file\" id=\"myfile\" value=\"\" name=\"myfile\" multiple=\"multiple\"/\u003e\n\u003cbutton id=\"uploader\"\u003eUpload\u003c/button\u003e\n```\n\n### Javascript\n\n```javascript\n\u003cscript type=\"text/javascript\"\u003e\n    var uploader = document.getElementById('uploader');\n    uploader.addEventListener(\"click\", function(e) {\n\n        H5Uploader.upload({\n            action: 'upload',\n            id: 'myfile',\n            size: {\n                max: 5000, // 5000kb \n                valide: function(e) {\n                    if (e) {\n                        alert(\"The size of \" + e.name + \" is exceed max value!\");\n                    }\n                }\n            }, // MB\n            type: {\n                name: 'csv;png;jpg',\n                valide: function(e) {\n                    if (e) {\n                        alert(\"The type of \" + e.name + \" is not supported!\");\n                    }\n                }\n            },\n            progress: function() {\n                    var p = document.createElement('p');\n                    p.innerHTML = \"uploading\";\n                    p.id = \"loading\";\n                    document.body.appendChild(p);\n            },\n            success: function(data) {\n                alert(data);\n                if (data \u0026\u0026 data == 200) {\n                    document.getElementById('loading').innerHTML = \"The file upload successfully!\";\n                    alert(\"The file upload successfully.\");\n                }\n            },\n            fail: function(data) {\n\n            }\n        });\n\n    }, false);\n    \u003c/script\u003e\n```\n\n**more examples and demos can be found in [`/example`](https://github.com/wewoor/h5uploader/tree/master/example) directory.**\n\n## Options\n\nname | type | description\n| - | - | - |\naction | string | file upload request path\nid | string | input element id,`example: \u003cinput id=\"myfile\"/\u003e` \nsize | object | validate file size\ntype | object | validate file type\nprogress | function | progress for upload\nsuccess | function | when file upload successfully callback\nfail | function | when file upload fail callback\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwewoor%2Fh5uploader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwewoor%2Fh5uploader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwewoor%2Fh5uploader/lists"}