{"id":22289287,"url":"https://github.com/javadelight/delight-fileupload","last_synced_at":"2025-06-28T05:33:37.251Z","repository":{"id":144611033,"uuid":"52494113","full_name":"javadelight/delight-fileupload","owner":"javadelight","description":"A simple wrapper for Apache Commons FileUpload to use it with Netty and other IO servers","archived":false,"fork":false,"pushed_at":"2025-06-21T09:26:40.000Z","size":70,"stargazers_count":11,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-21T10:28:47.916Z","etag":null,"topics":["commons-fileupload","netty"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javadelight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.TXT","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,"zenodo":null}},"created_at":"2016-02-25T03:31:04.000Z","updated_at":"2025-05-09T01:17:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ea635be-7b98-4079-a746-519fdf37d7db","html_url":"https://github.com/javadelight/delight-fileupload","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/javadelight/delight-fileupload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javadelight%2Fdelight-fileupload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javadelight%2Fdelight-fileupload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javadelight%2Fdelight-fileupload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javadelight%2Fdelight-fileupload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javadelight","download_url":"https://codeload.github.com/javadelight/delight-fileupload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javadelight%2Fdelight-fileupload/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262382059,"owners_count":23302256,"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":["commons-fileupload","netty"],"created_at":"2024-12-03T17:08:44.882Z","updated_at":"2025-06-28T05:33:37.192Z","avatar_url":"https://github.com/javadelight.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# delight-fileupload\n\nA simple wrapper for [Apache Commons FileUpload](https://commons.apache.org/proper/commons-fileupload/) for allowing it \nto work with Netty and other IO servers.\n\nPart of the [Java Delight Suite](http://javadelight.org).\n\n## Dependency\n\nJust add the following dependency to your projects.\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.javadelight\u003c/groupId\u003e\n    \u003cartifactId\u003edelight-fileupload\u003c/artifactId\u003e\n    \u003cversion\u003e[insert latest version]\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nThis artifact is available on [Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cdelight-fileupload) and \n[BinTray](https://bintray.com/javadelight/javadelight/delight-fileupload).\n\n[![Maven Central](https://img.shields.io/maven-central/v/org.javadelight/delight-fileupload.svg)](https://search.maven.org/#search%7Cga%7C1%7Cdelight-fileupload)\n\nPlease note in order to use this package, the `javax.servlet` dependency needs to be defined in your project as well. Such as:\n\n```xml\n\t\t\u003cdependency\u003e\n\t\t\t\u003cgroupId\u003ejavax.servlet\u003c/groupId\u003e\n\t\t\t\u003cartifactId\u003ejavax.servlet-api\u003c/artifactId\u003e\n\t\t\t\u003cversion\u003e3.1.0\u003c/version\u003e\n\t\t\u003c/dependency\u003e\n```\n\n\n## Usage\n\nFirst obtain the raw data of the request in the framework you are using:\n\n```java\nbyte[] data = ... posted data\n\nString contentType = ... header \"Content-Type\"\n```\n    \nThen call customized FileUpload to process the request:    \n    \n```java\nFileItemIterator iterator = FileUpload.parse(data, contentType);\n```\n\nFinally, process the items in the multipart request:\n\n```java\nwhile (iter.hasNext()) {\n    FileItemStream item = iter.next();\n\n    if (item.isFormField()) {\n        ... some fields in the form\n    } else {\n        InputStream stream = item.openStream();\n        // work with uploaded file data by processing stream ...\n    }\n\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavadelight%2Fdelight-fileupload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavadelight%2Fdelight-fileupload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavadelight%2Fdelight-fileupload/lists"}