{"id":18355888,"url":"https://github.com/anduin2017/jquery-progress-upload","last_synced_at":"2025-04-10T01:46:16.999Z","repository":{"id":57282297,"uuid":"131897953","full_name":"Anduin2017/jquery-progress-upload","owner":"Anduin2017","description":"A library to show progress and open button for file uploader.","archived":false,"fork":false,"pushed_at":"2025-01-02T17:44:19.000Z","size":392,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T23:35:53.110Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Anduin2017.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-02T19:40:07.000Z","updated_at":"2024-10-08T09:51:00.000Z","dependencies_parsed_at":"2023-11-22T20:24:59.640Z","dependency_job_id":"b7119ecf-6e08-4299-9231-54e35f3fcad2","html_url":"https://github.com/Anduin2017/jquery-progress-upload","commit_stats":null,"previous_names":["anduin2017/jquery-upload-progress"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anduin2017%2Fjquery-progress-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anduin2017%2Fjquery-progress-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anduin2017%2Fjquery-progress-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anduin2017%2Fjquery-progress-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anduin2017","download_url":"https://codeload.github.com/Anduin2017/jquery-progress-upload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142536,"owners_count":21054665,"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-11-05T22:08:15.987Z","updated_at":"2025-04-10T01:46:16.960Z","avatar_url":"https://github.com/Anduin2017.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jquery-progress-upload\n\n[![npm](https://img.shields.io/npm/v/jquery-progress-upload.svg?style=flat)](https://www.npmjs.com/package/jquery-progress-upload)\n[![ManHours](https://manhours.aiursoft.cn/r/gitlab.aiursoft.cn/anduin/jquery-progress-upload.svg)](https://gitlab.aiursoft.cn/anduin/jquery-progress-upload/-/commits/master?ref_type=heads)\n\nA library to show progress and open button for file uploader.\n\n## How to install\n\n```bash\nnpm install jquery-progress-upload\n```\n\nAnd add your reference:\n\n```html\n\u003cscript src=\"node_modules/jquery/dist/jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"node_modules/jquery-progress-upload/src/jquery-progress-upload.js\"\u003e\u003c/script\u003e\n```\n\n## How to use\n\n### Client side\n\nCreate a form\n\n```html\n\u003cform action=\"/api/upload\" method=\"post\" enctype=\"multipart/form-data\"\u003e\n    \u003cinput type=\"file\" id=\"file\" data-max-file-size=\"30M\" /\u003e\n\u003c/form\u003e\n```\n\nAdd add the following javascript.\n\n```javascript\nvar settings = { };\n$('#file').setProgressedUploader(settings);\n```\n\nRun your app and upload a file.\n\n### Server side\n\nCreate a new action at `/api/upload` and save that file.\n\nFor example:(In C#)\n\n```C#\nvar file = Request.Form.Files.First();\nvar fileStream = new FileStream(GetCurrentDirectory(), FileMode.Create);\nawait file.CopyToAsync(fileStream);\n```\n\n## API\n\n```javascript\nvar settings = {\n    onInit: function (elements) {\n        //Occurs when element loads.\n    },\n\n    onGetFile: function (elements) {\n        //Occurs when user put a file in it.\n    },\n\n    onStartSubmitting: function (elements) {\n        //Occurs when user is submitting the form.\n    },\n\n    onProcessing: function (elements) {\n        //Occurs when all data transformed.\n    },\n\n    onFinish: function (elements, data) {\n        //Occurs when server gives response.\n    },\n    \n    onError: function(e){\n        //Occurs when server could not accept the file.\n    }\n};\n\n$('#file').setProgressedUploader(settings);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanduin2017%2Fjquery-progress-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanduin2017%2Fjquery-progress-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanduin2017%2Fjquery-progress-upload/lists"}