{"id":19580461,"url":"https://github.com/vinpac/upload-component","last_synced_at":"2026-05-13T18:38:13.076Z","repository":{"id":26666291,"uuid":"30122796","full_name":"vinpac/upload-component","owner":"vinpac","description":"Classe de upload de arquivos. ","archived":false,"fork":false,"pushed_at":"2015-02-03T14:12:40.000Z","size":2239,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-14T20:31:06.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/vinpac.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}},"created_at":"2015-01-31T19:06:52.000Z","updated_at":"2015-02-02T19:16:56.000Z","dependencies_parsed_at":"2022-07-25T16:00:16.128Z","dependency_job_id":null,"html_url":"https://github.com/vinpac/upload-component","commit_stats":null,"previous_names":["vini175pa/upload-component"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vinpac/upload-component","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinpac%2Fupload-component","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinpac%2Fupload-component/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinpac%2Fupload-component/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinpac%2Fupload-component/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vinpac","download_url":"https://codeload.github.com/vinpac/upload-component/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vinpac%2Fupload-component/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32995909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-11T07:26:10.228Z","updated_at":"2026-05-13T18:38:13.060Z","avatar_url":"https://github.com/vinpac.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"##  UploadComponent\nUploadComponent is a simple component developed to support uploading any kind of file through CakePHP. It gives you total control of uploaded files and special functions to deal with image upload\n\n--\n\n##### Usage example :\n\n    if($this-\u003erequest-\u003eis('post')){\n        $able =  $this-\u003eUpload-\u003eable($this-\u003erequest-\u003edata['foto'], true);\t\n        if($able === true){\n            $foto = uniqid(time());\n            $img1 = $this-\u003eUpload-\u003euploadIMG($this-\u003erequest-\u003edata['foto'],\n                array(\n         \t\t    \"quality\" =\u003e \"H\",\n         \t\t    \"resize\"=\u003earray(\n         \t\t\t    \"width\"  =\u003e 140,\n         \t\t\t    \"height\" =\u003e 140,\n         \t\t\t    \"cover\"  =\u003e 'cover'\n         \t\t    ),\n            \"name\" =\u003e $foto.\"_140\"\n         \t));\n            if($img1 !== true) $this-\u003eSession-\u003esetFlush('Algo de errado aconteceu : '.$img1 );\n        }else{\n            $this-\u003eSession-\u003esetFlush('Erro : '.$able);\n        }\n    }\n    \n\n\n\n\n--\n\n##### Documentação :\n\n--\n\n###### *UploadComponent*::dir\n\nDireitorio a ser salvo\n\n--\n\n\n###### *UploadComponent*::chagedir(*String* $dir)\n \nMuda o direito atual a ser salvo\n\n--\n\n###### *UploadComponent*::trueFile(*File* $file)\n\nRetorna o verdadeiro Array do arquivo\n\n--\n\n###### *UploadComponent*::file(*File* $file)\n\nSeta o arquivo atual\n\n--\n\n###### *UploadComponent*::clear()\n\nLimpa as variaveis e remove o arquivo sendo usado\n\n--\n\n###### *UploadComponent*::delete(*String* $name = *UploadComponent*::file, *String* $dir)\n\n  - **$name** Nome do arquivo\n  - **$dir** Direito do arquivo\n\nDeleta um arquivo no diretorio atual\n\n--\n\n###### *UploadComponent*::fileType(*File* $file)\n\nRetorna o tipo do arquivo\n\n--\n\n###### *UploadComponent*::uploadImg(*File* $file, *Array* $params)\n - *Array** *$params**\n    * *Array* Resize\n        * *Integer* width\n        * *Integer* height\n        * *String* cover\n    * *String* Name\n    * *String* Quality\n    \n--\n\n###### *UploadComponent*::able( *File* $file, *Boolean* $msg = false, *Array* $ext)\n - **$file** Arquivo a ser verificado\n - **$msg**  Retornar uma messagem ou Boolean\n - **$ext**  Array com tipos de aquivo aceitos\n\n--\n\n###### *UploadComponent*::resize(*Integer* $w, *Integer* $h, *Integer* $x, *Integer* $y, *Boolean* $cover=false)\n - **$w** Largura da imagem\n - **$h** Altura da image\n - **$x** Nova Largura\n - **$y** Nova Altura\n - **$cover** Cortar a imagem\n\nRetorna um array com novo W, H, X, Y\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinpac%2Fupload-component","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinpac%2Fupload-component","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinpac%2Fupload-component/lists"}