{"id":23619386,"url":"https://github.com/frankodoom/http_posted_file_helper","last_synced_at":"2025-11-07T00:31:00.399Z","repository":{"id":97247256,"uuid":"93989899","full_name":"frankodoom/HTTP_Posted_File_Helper","owner":"frankodoom","description":"A Light-weight Library For Posting Files in Asp.Net. Post files to IIS and Microsoft Azure account with few lines of code.","archived":false,"fork":false,"pushed_at":"2017-09-02T17:23:19.000Z","size":50396,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T20:47:59.036Z","etag":null,"topics":["asp-net-mvc","asynchronous","azure-blob","azure-storage","csharp","filebase","filehelper","fileupload"],"latest_commit_sha":null,"homepage":"","language":"C#","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/frankodoom.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-11T07:51:36.000Z","updated_at":"2017-07-27T19:43:29.000Z","dependencies_parsed_at":"2023-03-13T16:18:17.001Z","dependency_job_id":null,"html_url":"https://github.com/frankodoom/HTTP_Posted_File_Helper","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/frankodoom%2FHTTP_Posted_File_Helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankodoom%2FHTTP_Posted_File_Helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankodoom%2FHTTP_Posted_File_Helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frankodoom%2FHTTP_Posted_File_Helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frankodoom","download_url":"https://codeload.github.com/frankodoom/HTTP_Posted_File_Helper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239513381,"owners_count":19651323,"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":["asp-net-mvc","asynchronous","azure-blob","azure-storage","csharp","filebase","filehelper","fileupload"],"created_at":"2024-12-27T19:51:10.626Z","updated_at":"2025-11-07T00:31:00.370Z","avatar_url":"https://github.com/frankodoom.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![NuGet](https://img.shields.io/nuget/v/Nuget.Core.svg)](https://www.nuget.org/packages/HttpPostedFileHelper/)\n\nHTTP Posted File Helper V.1.0.2\n\nThis is a light weight library that helps in the posting of files to IIS Webserver by providing a helper class FileHElper.cs which contains overloaded methods ProcessFile() which reduces the boilerplate in posting files.\n\nInstalling..\n\n    PM\u003e Install-Package HttpPostedFileHelper\n\nUsage\n\n //Reference the Library\n  using HttpPostedFileHelper;\nProcessing Single Files (Basic Usage)\n\n```c#\n[HttpPost]  \n     [ValidateAntiForgeryToken] \n      public ActionResult UploadFile(HttpPostedFileBase file)\n      {\n       //Instanciate the Filehelper class to create a Filehelper Object\n       FileHelper filehelper = new FileHelper();\n       filehelper.ProcessFile(file, \"{path to Existing or New Directory}\");\n       return view();\n      };\n```\n\n\nProcessing Multiple Files\nThis makes provision for multiple files being uploaded to the server with an overridden method for Processing an IEnumerable of files (HttpPostedFileBase Collection)\n\n    [HttpPost]\n    [ValidateAntiForgeryToken]\n    public ActionResult UploadFile(Model model, IEnumerable\u003cHttpPostedFileBase\u003e file)\n    {\n        FileHelper filehelper = new FileHelper();\n        // ProcessFileAsync returns count of files processed           \n        int postedfiles = filehelper.ProcessFile(file, \"~/MyTargetLocation\");\n        if (postedfiles \u003e 0)\n        {\n            //files were written successfully\n        }           \n        return View(\"Home\");\n    }\nAsynchronous File Processing\nProcessing files can be done Asynchronously, this allows large files to be processed in the background thread freeing the main thread\n\n       [HttpPost]\n       [ValidateAntiForgeryToken]\n       public async Task\u003cActionResult\u003e UploadFile(Model model, IEnumerable\u003cHttpPostedFileBase\u003e file)\n       {\n          FileHelper filehelper = new FileHelper();          \n          await filehelper.ProcessFileAsync(file, \"~/MyTargetLocation\");\n          //you can do some other work while awaiting          \n           return View(\"Home\");\n        }\nReject File Extensions During Upload\nYou can specify the file types to be rejected during an upload by supplying a string of the file extensions\n\n         [HttpPost]\n         [ValidateAntiForgeryToken]\n         public async Task\u003cActionResult\u003e UploadFile(Model model, IEnumerable\u003cHttpPostedFileBase\u003e file)\n          {\n            FileHelper filehelper = new FileHelper();\n            string reject = \".jpeg,.png,.svg\";\n            int postedfiles = await filehelper.ProcessFileAsync(file, \"~/MyTargetLocation\",reject);\n            //you can do some other work while awaiting   \n            if (postedfiles \u003e 0)\n             {\n                //files were written successfully\n              }   \n             return View(\"Home\");\n          }\n          \n   \n Uploading Large Files \u003c/br\u003e\n If you want to upload large files, by default IIS is set to upload files up to 4mb however, you can modify your web.config to allow\n upload of your choice.\n      \n  maxRequestLength\n       \n             \u003chttpRuntime targetFramework=\"4.5.2\" executionTimeout=\"240000\"  maxRequestLength=\"2048000\"  /\u003e\n             \n   maxAllowedContentLength        \n          \n           \u003csystem.webServer\u003e\n             \u003csecurity\u003e\n                   \u003crequestFiltering\u003e\n                      \u003crequestLimits maxAllowedContentLength=\"2147483648\" /\u003e\n                   \u003c/requestFiltering\u003e\n                \u003c/security\u003e\n             \u003c/system.webServer\u003e\n    \n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankodoom%2Fhttp_posted_file_helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrankodoom%2Fhttp_posted_file_helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrankodoom%2Fhttp_posted_file_helper/lists"}