{"id":16025137,"url":"https://github.com/jupi007/dropzonejs-uploader-bundle","last_synced_at":"2026-03-08T11:35:22.531Z","repository":{"id":43212629,"uuid":"413562063","full_name":"Jupi007/dropzonejs-uploader-bundle","owner":"Jupi007","description":"Ultra simple Symfony bundle to handle Dropzone.js request","archived":false,"fork":false,"pushed_at":"2024-09-08T09:45:40.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-09T17:06:35.753Z","etag":null,"topics":["bundle","dropzone-js","dropzonejs","php","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","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/Jupi007.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":"2021-10-04T19:46:28.000Z","updated_at":"2024-09-08T09:45:44.000Z","dependencies_parsed_at":"2024-06-29T19:42:56.633Z","dependency_job_id":"0d4419b8-d89e-49e8-b8a8-88e419c458a2","html_url":"https://github.com/Jupi007/dropzonejs-uploader-bundle","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":0.2941176470588235,"last_synced_commit":"47119dbc75187335bdc6b39363054ef44ae1b569"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jupi007%2Fdropzonejs-uploader-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jupi007%2Fdropzonejs-uploader-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jupi007%2Fdropzonejs-uploader-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jupi007%2Fdropzonejs-uploader-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jupi007","download_url":"https://codeload.github.com/Jupi007/dropzonejs-uploader-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221700029,"owners_count":16866069,"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":["bundle","dropzone-js","dropzonejs","php","symfony","symfony-bundle"],"created_at":"2024-10-08T19:41:31.927Z","updated_at":"2026-03-08T11:35:22.510Z","avatar_url":"https://github.com/Jupi007.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eJupi DropzoneJS Uploader Bundle\u003c/h1\u003e\n\nAn ultra simple Symfony bundle to handle [Dropzone.js](https://github.com/dropzone/dropzone) upload request.\n\nInstallation\n============\n\nMake sure Composer is installed globally, as explained in the\n[installation chapter](https://getcomposer.org/doc/00-intro.md)\nof the Composer documentation.\n\nApplications that use Symfony Flex\n----------------------------------\n\nOpen a command console, enter your project directory and execute:\n\n```console\n$ composer require \"jupi/dropzonejs-uploader-bundle\"\n```\n\nApplications that don't use Symfony Flex\n----------------------------------------\n\n### Step 1: Download the Bundle\n\nOpen a command console, enter your project directory and execute the\nfollowing command to download the latest stable version of this bundle:\n\n```console\n$ composer require \"jupi/dropzonejs-uploader-bundle\"\n```\n\n### Step 2: Enable the Bundle\n\nThen, enable the bundle by adding it to the list of registered bundles\nin the `config/bundles.php` file of your project:\n\n```php\n// config/bundles.php\n\nreturn [\n    // ...\n    Jupi\\DropzoneJsUploaderBundle\\DropzoneJsUploaderBundle::class =\u003e ['all' =\u003e true],\n];\n```\n\nUsage\n=====\n\nThe way of working of this bundle is very simple. It provides a param converter which handle the current request and pass the uploaded file to the controller\n\nIf the request is chunked, a temp file is created inside the system temp folder (using `sys_get_temp_dir()`) and `null` is passed to the controller until the file is entirely uploaded.\n\nI recommend to use [VichUploaderBundle](https://github.com/dustin10/VichUploaderBundle) to handle the database saving side.\n\n```php\n\u003c?php\n\nnamespace App\\Controller;\n\nuse App\\Entity\\File;\nuse Doctrine\\ORM\\EntityManagerInterface;\nuse Symfony\\Component\\HttpFoundation\\File\\UploadedFile;\nuse Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController;\n// ...\nuse Jupi\\DropzoneJsUploaderBundle\\Attribute\\MapDropzoneJsUpload;\n\nclass AppController extends AbstractController\n{\n    #[Route(\"/upload\", name:\"upload\")]\n    public function upload(\n        EntityManagerInterface $em,\n\n        #[MapDropzoneJsUpload]\n        ?UploadedFile $file,\n    ): Response\n    {\n        // Check if $file is not null, in case of a chunked request\n        if (null !== $file) {\n            // Assuming it is a correctly configured VichUploadable class\n            $entity = new File();\n            $entity-\u003esetFile($file);\n\n            $em-\u003epersist($entity);\n            $em-\u003eflush();\n        }\n\n        // Return a success resonse\n        // In case of an error, this bundle will correct the response format\n        // so Dropzone.JS will display the correct 500 error message\n        return new JsonResponse(['success' =\u003e true]);\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjupi007%2Fdropzonejs-uploader-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjupi007%2Fdropzonejs-uploader-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjupi007%2Fdropzonejs-uploader-bundle/lists"}