{"id":19381848,"url":"https://github.com/ctechhindi/codeigniter-multiple-file-upload-library","last_synced_at":"2025-04-23T20:32:03.386Z","repository":{"id":118143415,"uuid":"234677177","full_name":"ctechhindi/CodeIgniter-Multiple-File-Upload-Library","owner":"ctechhindi","description":"CodeIgniter 3.x Library - Multiple File Upload and Validation","archived":false,"fork":false,"pushed_at":"2020-01-20T06:41:34.000Z","size":16,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-02T19:47:05.652Z","etag":null,"topics":["codeigniter","codeigniter-library","codeigniter3","library","php","upload-library"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/ctechhindi.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-18T03:43:49.000Z","updated_at":"2024-02-18T13:45:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"e586337a-aedb-4c7e-80a1-ea1e8e3850c5","html_url":"https://github.com/ctechhindi/CodeIgniter-Multiple-File-Upload-Library","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctechhindi%2FCodeIgniter-Multiple-File-Upload-Library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctechhindi%2FCodeIgniter-Multiple-File-Upload-Library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctechhindi%2FCodeIgniter-Multiple-File-Upload-Library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctechhindi%2FCodeIgniter-Multiple-File-Upload-Library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctechhindi","download_url":"https://codeload.github.com/ctechhindi/CodeIgniter-Multiple-File-Upload-Library/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250509740,"owners_count":21442486,"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":["codeigniter","codeigniter-library","codeigniter3","library","php","upload-library"],"created_at":"2024-11-10T09:18:35.583Z","updated_at":"2025-04-23T20:32:03.379Z","avatar_url":"https://github.com/ctechhindi.png","language":"PHP","readme":"# CodeIgniter-Multiple-File-Upload-Library\nCodeIgniter 3.x Library - Multiple File Upload and Validation\n\n## Installation\n\nSimply copy the `Upload_documents.php` file to your applications library directory.\n\n## Required\n\n* PHP Extension `gd` and `gmp`\n\n## Use\n\n## Fields\n\n```php\n$this-\u003eload-\u003elibrary('upload_documents');\n\n$output = $this-\u003eupload_documents-\u003erun([\n    'field_name'    =\u003e 'file_name', // Field Name\n    'upload_path'   =\u003e './upload/images/', // Upload Path\n    'allowed_types' =\u003e 'jpg|png|jpeg', // File Types\n    // 'encrypt_name' =\u003e TRUE, // Change File Name\n    // 'overwrite' =\u003e TRUE,\n    // 'max_size' =\u003e 55,\n    // 'max_filename' =\u003e '255',\n    // 'max_width' =\u003e 18222,\n    // 'min_width' =\u003e 19222,\n    // 'max_height' =\u003e 1722,\n    // 'min_height' =\u003e 1262,\n    'thumbs' =\u003e [\n        'small' =\u003e [ 'w' =\u003e 28, 'h'=\u003e 28, 'path' =\u003e './upload/images/'],\n        // 'key' =\u003e [ 'w' =\u003e wight, 'h'=\u003e height, 'path' =\u003e 'upload path'],\n    ],\n]);\n```\n\n### Upload Only Single File\n\n```php\n// Load Library: Document Upload\n$this-\u003eload-\u003elibrary('upload_documents');\n\n$output = $this-\u003eupload_documents-\u003erun([\n    'field_name'    =\u003e 'file_field_name', // Field Name\n    'upload_path'   =\u003e './assets/image/', // Upload Path\n    'allowed_types' =\u003e 'jpg|png|jpeg', // File Types\n    'max_size' =\u003e 200, // Maximum File Size (KB)\n    'thumbs' =\u003e [ // Image Thumbnail Size\n        \"x128\" =\u003e [ 'w' =\u003e 128, 'h'=\u003e 128, 'path' =\u003e './assets/image/thumb/'],\n        \"x192\" =\u003e [ 'w' =\u003e 192, 'h'=\u003e 192, 'path' =\u003e './assets/image/thumb/'],\n        \"x256\" =\u003e [ 'w' =\u003e 256, 'h'=\u003e 256, 'path' =\u003e './assets/image/thumb/'],\n        \"x512\" =\u003e [ 'w' =\u003e 512, 'h'=\u003e 512, 'path' =\u003e './assets/image/thumb/'],\n    ],\n]);\n\nprint_r($output); // $output['status'] = TRUE/FALSE\n```\n\n### Upload Multiple File One Time\n\nFirstly check file validation then uploading start.\n\n```php\n// Load Library: Document Upload\n$this-\u003eload-\u003elibrary('upload_documents');\n\n// Upload Multiple Files\n$output = $this-\u003eupload_documents-\u003emulti([\n    'field_name'    =\u003e 'file_field_name', // Field Name\n    'upload_path'   =\u003e './assets/image/', // Upload Path\n    'allowed_types' =\u003e 'jpg|png|jpeg', // File Types\n    'max_size' =\u003e 300, // Maximum File Size (KB)\n    'thumbs' =\u003e [\n        \"x256\" =\u003e [ 'w' =\u003e 256, 'h'=\u003e 256, 'path' =\u003e './assets/image/thumb/'],\n        \"x512\" =\u003e [ 'w' =\u003e 512, 'h'=\u003e 512, 'path' =\u003e './assets/image/thumb/'],\n    ],\n]);\n```\n\n### Fetch Upload Images and Doc\n\n```php\n// Load Library: Document Upload\n$this-\u003eload-\u003elibrary('upload_documents');\n\n$output = $this-\u003eupload_documents-\u003eshow_image(base_url('upload/images/'), 'file_name.png', 'key');\nvar_dump($output);\n\n// AND\n\n[\n  // Original File\n  \"org\"  =\u003e $this-\u003eupload_documents-\u003eshow_image(base_url('/assets/building/'), $fileName),\n  // Image Thumbnail's\n  \"x128\"  =\u003e $this-\u003eupload_documents-\u003eshow_image(base_url('/assets/building/thumb/'), $fileName, 'x128'),\n  \"x192\"  =\u003e $this-\u003eupload_documents-\u003eshow_image(base_url('/assets/building/thumb/'), $fileName, 'x192'),\n  \"x256\"  =\u003e $this-\u003eupload_documents-\u003eshow_image(base_url('/assets/building/thumb/'), $fileName, 'x256'),\n  \"x512\"  =\u003e $this-\u003eupload_documents-\u003eshow_image(base_url('/assets/building/thumb/'), $fileName, 'x512'),\n]\n```\n\n### Delete Image \u0026 Doc in Server\n\n```php\n$img_x128Path = $this-\u003eupload_documents-\u003eshow_image_path(FCPATH. '/assets/building/thumb/', $fileName, \"x128\");\nunlink($img_x128Path);\n```\n\n## Reporting Issues ☢️\n\nIf you have a problem with this plugin or found any bug, please open an issue on [GitHub](https://github.com/ctechhindi/CodeIgniter-Multiple-File-Upload-Library/issues).\n\n## Copyright and License ©️\n\nCode copyright 2020 ctechhindi. Code released under the [MIT license](http://www.opensource.org/licenses/MIT)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctechhindi%2Fcodeigniter-multiple-file-upload-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctechhindi%2Fcodeigniter-multiple-file-upload-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctechhindi%2Fcodeigniter-multiple-file-upload-library/lists"}