{"id":18929660,"url":"https://github.com/thecodingmachine/mvc.bce.jquery-file-upload","last_synced_at":"2026-03-16T15:30:18.422Z","repository":{"id":16553709,"uuid":"19307421","full_name":"thecodingmachine/mvc.bce.jquery-file-upload","owner":"thecodingmachine","description":"This package contains a jQuery file upload based field descriptor and renderer for BCE. This will help you build forms with HTML5 file upload capabilities.","archived":false,"fork":false,"pushed_at":"2015-02-05T12:59:15.000Z","size":525,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":15,"default_branch":"3.2","last_synced_at":"2025-02-16T12:30:28.865Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mouf-php.com/packages/mouf/thecodingmachine/mvc.bce.mvc.bce.jquery-file-upload","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/thecodingmachine.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":"2014-04-30T08:52:11.000Z","updated_at":"2014-10-09T13:09:10.000Z","dependencies_parsed_at":"2022-08-22T20:31:21.690Z","dependency_job_id":null,"html_url":"https://github.com/thecodingmachine/mvc.bce.jquery-file-upload","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/thecodingmachine%2Fmvc.bce.jquery-file-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fmvc.bce.jquery-file-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fmvc.bce.jquery-file-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodingmachine%2Fmvc.bce.jquery-file-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodingmachine","download_url":"https://codeload.github.com/thecodingmachine/mvc.bce.jquery-file-upload/tar.gz/refs/heads/3.2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239927825,"owners_count":19719835,"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":[],"created_at":"2024-11-08T11:34:13.780Z","updated_at":"2026-03-16T15:30:18.377Z","avatar_url":"https://github.com/thecodingmachine.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"About the jQuery file upload descriptor and renderer for BCE\n============================================================\n\nBCE is a form builder for the [Mouf framework](http://mouf-php.com).\nThis package contains classes enabling the use of the **jQuery file upload** plugin right into forms generated by BCE.\n\nHow to use it\n-------------\n\n###Single file uploads:\nTODO\n\n###Multi file uploads:\n\nIf you want to upload multiple files associated to a bean, it is likely you have a database table containing the list of files.\n\nFor instance, if you have a form representing a product, and if the product can have many photos attached to it, you certainly have a \"products\" table and a \"product_photos\" table that points towards product. Therefore, you probable have a `ProductPhotoDao` and `ProductPhotoBean` class.\n\nThe first thing to do is this:\n\n- `ProductPhotoDao` (the DAO of the table that contains the list of files) should implement the `FileDaoInterface`\n- `ProductPhotoBean` (the Bean of the table that contains the list of files) should implement the `FileBeanInterface`\n\n####FileDaoInterface\n```php\ninterface FileDaoInterface extends DAOInterface {\n\t/**\n\t * Returns a list of beans implementing the FileBeanInterface associated with the main bean containing the files.\n\t * \n\t * @param TDBMObject $mainBean\n\t */\n\tfunction findFiles($mainBean);\n}\n```\n\nThe `findFiles` method will return the list of beans of the \"file\" table. If you are using TDBM, a typical implementation is:\n\n```php\npublic function findFiles($mainBean) {\n\t// Returns a list of FileBeanInterface associated to $mainBean\n\treturn $this-\u003egetListByFilter($mainBean);\n}\n```\n\n####FileBeanInterface\n```php\ninterface FileBeanInterface {\n\t/**\n\t * Returns the full path to the file.\n\t */\n\tfunction getFullPath();\n\t\n\t/**\n\t * Sets the name of the file to be stored.\n\t * \n\t * @param string $fileName\n\t */\n\tfunction setFileName($fileName);\n\t\n\t/**\n\t * Sets the main bean we are pointing to.\n\t * \n\t * @param TDBMObject $mainBean\n\t */\n\tfunction setMainBean($mainBean);\n}\n```\n\nPlease note that `getFullPath` should return the complete path to the file stored on disk on the server.\n`setFileName` is only setting the name of the file (not the path). Finally `setMainBean` is setting the\nobject the file is related to. In our exemple, that would be an instance of `ProductBean`.\n\nAre you done? Well, now, implementing the jQueryFileUpload mechanism should be a breeze!\n\nGo to your `BCEForm` in instance mode, and in the list of `fieldDescriptors`, drag'n'drop a \n`JqueryUploadMultiFileFieldDescriptor`.\n\n![Field descriptors](doc/images/field_descriptors.png)\n\nNow, configure the instance you just drag'n'dropped:\n\n![Field descriptor](doc/images/jqueryfileuploadmultifielddescritor.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fmvc.bce.jquery-file-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodingmachine%2Fmvc.bce.jquery-file-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodingmachine%2Fmvc.bce.jquery-file-upload/lists"}