{"id":13441720,"url":"https://github.com/tusdotnet/tusdotnet","last_synced_at":"2025-05-14T01:07:20.246Z","repository":{"id":41094925,"uuid":"66051694","full_name":"tusdotnet/tusdotnet","owner":"tusdotnet","description":".NET server implementation of the Tus protocol for resumable file uploads. Read more at https://tus.io","archived":false,"fork":false,"pushed_at":"2025-03-07T07:53:57.000Z","size":23057,"stargazers_count":703,"open_issues_count":7,"forks_count":74,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-04T13:01:45.068Z","etag":null,"topics":["dotnet-core","dotnet-standard","file-upload-server","file-uploads","nuget","owin-middleware","resumable","resumable-upload","tus","tus-protocol"],"latest_commit_sha":null,"homepage":"","language":"C#","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/tusdotnet.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":"2016-08-19T04:07:13.000Z","updated_at":"2025-04-01T19:48:30.000Z","dependencies_parsed_at":"2023-12-22T10:46:39.034Z","dependency_job_id":"e58897f0-4b9b-428e-b9ba-138066250c82","html_url":"https://github.com/tusdotnet/tusdotnet","commit_stats":{"total_commits":269,"total_committers":11,"mean_commits":"24.454545454545453","dds":0.0780669144981413,"last_synced_commit":"9f7e857c73f6ef439aabc1ccf4353d4580c1032c"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusdotnet%2Ftusdotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusdotnet%2Ftusdotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusdotnet%2Ftusdotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tusdotnet%2Ftusdotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tusdotnet","download_url":"https://codeload.github.com/tusdotnet/tusdotnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248465293,"owners_count":21108243,"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":["dotnet-core","dotnet-standard","file-upload-server","file-uploads","nuget","owin-middleware","resumable","resumable-upload","tus","tus-protocol"],"created_at":"2024-07-31T03:01:37.350Z","updated_at":"2025-04-11T18:59:26.074Z","avatar_url":"https://github.com/tusdotnet.png","language":"C#","funding_links":[],"categories":["HarmonyOS","C\\#","others"],"sub_categories":["Windows Manager"],"readme":"# tusdotnet\n\n[![NuGet](https://img.shields.io/nuget/v/tusdotnet.svg?color=blue\u0026style=popout-square)](https://www.nuget.org/packages/tusdotnet) [![NuGet](https://img.shields.io/nuget/dt/tusdotnet.svg?color=blue\u0026style=popout-square)](https://www.nuget.org/packages/tusdotnet) [![codecov](https://img.shields.io/codecov/c/github/tusdotnet/tusdotnet.svg?color=blue\u0026style=popout-square)](https://codecov.io/gh/tusdotnet/tusdotnet)\n\n\u003e\"Our aim is to solve the problem of unreliable file uploads once and for all. tus is a new open protocol for resumable uploads built on HTTP. It offers simple, cheap and reusable stacks for clients and servers. It supports any language, any platform and any network.\" - https://tus.io\n\ntusdotnet is a .NET server implementation of the tus.io protocol that runs on .NET Framework, .NET Standard, .NET6 and later.\n\nComments, ideas, questions and PRs are welcome!\n\n## Features\n\n* Runs on .NET Framework, .NET Standard 1.3+ and .NET 6+ using OWIN or ASP.NET Core\n* Full support for tus 1.0.0 including all major extensions (checksum, checksum-trailers, concatenation, creation, creation-with-upload, upload-defer-length, expiration and termination)\n* Experimental support for IETF's [Resumable Uploads For Http](https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/) (see branch [POC/tus2](https://github.com/tusdotnet/tusdotnet/tree/POC/tus2))\n* Fast and reliable\n* Easy to configure\n* Customizable data storage\n* MIT licensed\n\n## Install\n\nVisual Studio\n\n``PM\u003e Install-Package tusdotnet``\n\n.NET CLI\n\n``\u003e dotnet add package tusdotnet``\n\n## Configure\n\nOn .NET6 and later:\n```csharp\n\nusing tusdotnet;\n\nvar builder = WebApplication.CreateBuilder(args);\nvar app = builder.Build();\n\napp.MapTus(\"/files\", async httpContext =\u003e new()\n{\n    // This method is called on each request so different configurations can be returned per user, domain, path etc.\n    // Return null to disable tusdotnet for the current request.\n\n    // Where to store data?\n    Store = new tusdotnet.Stores.TusDiskStore(@\"C:\\tusfiles\\\"),\n    Events = new()\n    {\n        // What to do when file is completely uploaded?\n        OnFileCompleteAsync = async eventContext =\u003e\n        {\n            tusdotnet.Interfaces.ITusFile file = await eventContext.GetFileAsync();\n            Dictionary\u003cstring, tusdotnet.Models.Metadata\u003e metadata = await file.GetMetadataAsync(eventContext.CancellationToken);\n            using Stream content = await file.GetContentAsync(eventContext.CancellationToken);\n\n            await DoSomeProcessing(content, metadata);\n        }\n    }\n});\n\n```\n\n Depending on your infrastructure you might also need to [configure Kestrel](https://github.com/tusdotnet/tusdotnet/wiki/Configure-Kestrel), [IIS](https://github.com/tusdotnet/tusdotnet/wiki/Configure-IIS) or [other reverse proxies](https://github.com/tusdotnet/tusdotnet/wiki/Configure-other-reverse-proxies). \n \n More options and events are available on the [wiki](https://github.com/tusdotnet/tusdotnet/wiki/Configuration).\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003eOn older frameworks, use the tusdotnet middelware\u003c/h3\u003e\u003c/summary\u003e\n\nCreate your Startup class as you would normally do. Add a using statement for `tusdotnet` and run `UseTus` on the app builder. Depending on your infrastructure you might also need to [configure Kestrel](https://github.com/tusdotnet/tusdotnet/wiki/Configure-Kestrel), [IIS](https://github.com/tusdotnet/tusdotnet/wiki/Configure-IIS) or [other reverse proxies](https://github.com/tusdotnet/tusdotnet/wiki/Configure-other-reverse-proxies).  More options and events are available on the [wiki](https://github.com/tusdotnet/tusdotnet/wiki/Configuration).\n\n```csharp\n\napp.UseTus(httpContext =\u003e new DefaultTusConfiguration\n{\n    // This method is called on each request so different configurations can be returned per user, domain, path etc.\n    // Return null to disable tusdotnet for the current request.\n\n    // c:\\tusfiles is where to store files\n    Store = new TusDiskStore(@\"C:\\tusfiles\\\"),\n    // On what url should we listen for uploads?\n    UrlPath = \"/files\",\n    Events = new Events\n    {\n        OnFileCompleteAsync = async eventContext =\u003e\n        {\n            ITusFile file = await eventContext.GetFileAsync();\n            Dictionary\u003cstring, Metadata\u003e metadata = await file.GetMetadataAsync(eventContext.CancellationToken);\n            using Stream content = await file.GetContentAsync(eventContext.CancellationToken);\n\n            await DoSomeProcessing(content, metadata);\n        }\n    }\n});\n\n```\n\u003c/details\u003e\n\n## Test sites\n\nIf you just want to play around with tusdotnet/the tus protocol, clone the repo and run one of the test sites. They each launch a small site running tusdotnet and the [official JS client](https://github.com/tus/tus-js-client) so that you can test the protocol on your own machine. \n\nTest sites are available for:\n\n* ASP.NET Core 6 (.NET 6.0)\n* ASP.NET Core 3.1 (.NET Core 3.1)\n* ASP.NET Core 3.0 (.NET Core 3.0)\n* ASP.NET Core 2.2 (.NET Core 2.2)\n* ASP.NET Core 2.2 (.NET Framework 4.6.2)\n* ASP.NET Core 2.1 (.NET Core 2.1)\n* OWIN (.NET Framework 4.5.2)\n\n## Clients\n\n[tus.io](http://tus.io/implementations.html) keeps a list of clients for a number of different platforms (Android, Java, JS, iOS etc). tusdotnet should work with all of them as long as they support version 1.0.0 of the protocol.\n\n## License\n\nThis project is licensed under the MIT license, see [LICENSE](LICENSE).\n\n## Want to know more?\n\nCheck out the [wiki](https://github.com/tusdotnet/tusdotnet/wiki) or create an [issue](https://github.com/tusdotnet/tusdotnet/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftusdotnet%2Ftusdotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftusdotnet%2Ftusdotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftusdotnet%2Ftusdotnet/lists"}