{"id":22046965,"url":"https://github.com/maatheusgois/image-handler","last_synced_at":"2025-03-23T14:25:45.932Z","repository":{"id":134555450,"uuid":"250642944","full_name":"MaatheusGois/image-handler","owner":"MaatheusGois","description":"Static Library Framework for download, upload and access camera and gallery in iOS. ","archived":false,"fork":false,"pushed_at":"2020-03-28T00:24:31.000Z","size":5531,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-28T20:31:12.029Z","etag":null,"topics":["image","imagehandler","ios","swift","swift-package-manager"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/MaatheusGois.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":"2020-03-27T20:43:05.000Z","updated_at":"2021-05-16T01:53:42.000Z","dependencies_parsed_at":"2023-06-18T03:47:26.962Z","dependency_job_id":null,"html_url":"https://github.com/MaatheusGois/image-handler","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/MaatheusGois%2Fimage-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaatheusGois%2Fimage-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaatheusGois%2Fimage-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaatheusGois%2Fimage-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaatheusGois","download_url":"https://codeload.github.com/MaatheusGois/image-handler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245114063,"owners_count":20562915,"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":["image","imagehandler","ios","swift","swift-package-manager"],"created_at":"2024-11-30T13:21:07.246Z","updated_at":"2025-03-23T14:25:45.900Z","avatar_url":"https://github.com/MaatheusGois.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ImageHandler  \nThis **handler** is to helper you with your image manager in your projects.  \n\n\n## Preview  \n\n\u003cimg src=\"https://github.com/MaatheusGois/ImageUpload/blob/example/public/preview.gif\"/\u003e\n\n## Examples  \n- [Server on Github](https://github.com/MaatheusGois/ImageUpload)\n\n### Usage  \n\nPicker\n```swift\nimport ImageHandler\n\nImageHandler.share.pickImage(self) { image in\n    //image here\n}\n```  \n\nUpload (save image in jpeg only)\n```swift\nimport ImageHandler\n\nlet image = UIImage() //put here your image\n\nImageHandler.share.uploadRequest(url: \"\\(url)/upload\", \n                                 image: image, \n                                 imageName: \"potato.jpeg\", \n                                 compression: 0.3, \n                                 filePathKey: \"fileUploader\") { (response) in\n    switch response {\n    case .success(let answer):\n        print(answer)\n    case .error(let description):\n        print(description)\n    }\n}\n```  \n\nDownload\n```swift\nimport ImageHandler\n\nlet url =  \"http://localhost:3000/flowersImage.jpeg\"\n\nImageHandler.share.downloadImageFromServerURL(urlString: \"\") { (response) in\n    switch response {\n    case .success(let answer):\n        //answer is your image\n        break\n    case .error(let description):\n        print(description)\n    }\n}\n\n```  \n\n## Warning\n\nDon't forget of set the \"Privacity Key\" in Info.plist:\n```\n\u003ckey\u003eNSCameraUsageDescription\u003c/key\u003e\n\u003cstring\u003e\u003c/string\u003e\n\n```\n\nAnd if you test in localhost server, you need desabilite the secure connection:\n```\n\u003ckey\u003eNSAppTransportSecurity\u003c/key\u003e\n\u003cdict\u003e\n    \u003ckey\u003eNSAllowsArbitraryLoads\u003c/key\u003e\n    \u003ctrue/\u003e\n\u003c/dict\u003e\n```\nAnd when the test moment is finish, enable again o7. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaatheusgois%2Fimage-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaatheusgois%2Fimage-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaatheusgois%2Fimage-handler/lists"}