{"id":24517711,"url":"https://github.com/pyzh/tornado-file-upload-example","last_synced_at":"2025-03-15T11:10:50.698Z","repository":{"id":196578624,"uuid":"164427863","full_name":"pyzh/tornado-file-upload-example","owner":"pyzh","description":null,"archived":false,"fork":false,"pushed_at":"2016-04-18T12:05:54.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-22T01:36:41.630Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"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/pyzh.png","metadata":{"files":{"readme":"README","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,"governance":null}},"created_at":"2019-01-07T12:13:53.000Z","updated_at":"2019-01-07T12:13:56.000Z","dependencies_parsed_at":"2023-09-26T08:19:45.855Z","dependency_job_id":null,"html_url":"https://github.com/pyzh/tornado-file-upload-example","commit_stats":null,"previous_names":["pyzh/tornado-file-upload-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyzh%2Ftornado-file-upload-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyzh%2Ftornado-file-upload-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyzh%2Ftornado-file-upload-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyzh%2Ftornado-file-upload-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyzh","download_url":"https://codeload.github.com/pyzh/tornado-file-upload-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243719399,"owners_count":20336607,"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":"2025-01-22T01:34:56.477Z","updated_at":"2025-03-15T11:10:50.679Z","avatar_url":"https://github.com/pyzh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 功能描述\n\n启动服务端\n\nmkdir upload\npython3 server.py \n\n浏览器中打开 (建议使用Firefox，因为只测试了Firefox)\n\nhttp://127.0.0.1:8000/index.html\n\n选择文件后会自动开始上传\n\n两个进度条，第一个是已经上传成功的进度，第二个是浏览器提示的进度\n\n上传成功后会显示文件链接\n\n\n## 上传原理\n\n浏览器发起PUT请求，每个请求只上传部分内容，用标准的Content-Range头来表示当前请求上传的范围。\n\n\n## 服务端实现\n\n所有文件相关操作都在线程池里运行。\n\n打开文件时，若文件不存在，应该先创建。\n\n若HTTP请求有Content-Range头，应该seek到其起始位置。\n\n\n## 浏览器端实现\n\n将文件按BLOCK_SIZE分块上传，若单块上传失败次数超过MAX_RETRY，即宣告上传失败。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyzh%2Ftornado-file-upload-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyzh%2Ftornado-file-upload-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyzh%2Ftornado-file-upload-example/lists"}