{"id":23152430,"url":"https://github.com/1amageek/sumo","last_synced_at":"2025-08-17T20:32:48.844Z","repository":{"id":94515552,"uuid":"87920023","full_name":"1amageek/Sumo","owner":"1amageek","description":"Sumo is a library that prepares for fast upload for iOS. It is effective when uploading by selecting images continuously.","archived":false,"fork":false,"pushed_at":"2017-04-28T04:35:15.000Z","size":775,"stargazers_count":241,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T13:22:50.601Z","etag":null,"topics":["ios","photos","sumo","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/1amageek.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}},"created_at":"2017-04-11T10:15:04.000Z","updated_at":"2023-07-18T10:51:40.000Z","dependencies_parsed_at":"2023-07-28T07:15:33.238Z","dependency_job_id":null,"html_url":"https://github.com/1amageek/Sumo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/1amageek/Sumo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1amageek%2FSumo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1amageek%2FSumo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1amageek%2FSumo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1amageek%2FSumo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1amageek","download_url":"https://codeload.github.com/1amageek/Sumo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1amageek%2FSumo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270902419,"owners_count":24665257,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ios","photos","sumo","swift"],"created_at":"2024-12-17T19:14:39.622Z","updated_at":"2025-08-17T20:32:48.471Z","avatar_url":"https://github.com/1amageek.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sumo\n\n\u003cimg src=\"https://github.com/1amageek/Sumo/blob/master/sumo.png\" width=\"240px\"\u003e\n\nSumo is a library that prepares for fast upload for iOS.\nIt is effective when uploading by selecting images continuously.\nSumo will prepare for uploading immediately after the image is selected.\nMultiple selected images are compiled into one file and compressed.\nOne compressed file can communicate without overhead.\n\n\u003cimg src=\"https://github.com/1amageek/Sumo/blob/master/overview.png\" width=\"640px\"\u003e\n\n\n## Feature 🎉\n- ☑️  Non blocking Main thread.\n- ☑️  Fast resizing.\n- ☑️  Task is cancelable.\n- ☑️  Multi sessions.\n\n\n## Usage\n\nSumo consists of sessions and tasks.\nMultiple tasks are associated with one session, and you can obtain obtain artifacts by zip the session.\n\n``` swift\noverride func viewDidLoad() {\n    super.viewDidLoad()\n    var options: Sumo.Session.Options = Sumo.Session.Options()\n    // Target of image resizing\n    options.imageTargetSize = CGSize(width: 500, height: 500)\n    Sumo.shared.startSession(options: options)\n}\n```\n\nFor example in CollectionView's\n\n- `func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath)` \n- `func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath)`\n\n``` swift\n// Compress and process the image in the background.\nfunc didSelectItem(indexPath: IndexPath, asset: PHAsset) {\n    Sumo.shared.startWorflow(asset.localIdentifier) { (error) in\n        if let error = error {\n            debugPrint(error)\n            return\n        }\n    }\n}\n\n// Cancel the image being compressed.\nfunc didDeselectItem(indexPath: IndexPath, asset: PHAsset) {\n    Sumo.shared.cancel(asset.localIdentifier)\n}\n```\n\n``` swift\n// Stop all processing.\n@objc private func cancel() {\n    Sumo.shared.stop()\n}\n\n// Cancel the task being processed. The session will continue to remain.\n@objc private func reset() {\n    Sumo.shared.reset()\n}\n\n// Compress the resized photo to zip.\n@objc private func zip() {\n    Sumo.shared.zip { (url, error) in\n        // Transfer to any server.\n    }\n}\n```\n \n[AssemblyLine](https://github.com/1amageek/AssemblyLine) is generalized to Sumo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1amageek%2Fsumo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1amageek%2Fsumo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1amageek%2Fsumo/lists"}