{"id":19258899,"url":"https://github.com/lassehaslev/vue-dropzone","last_synced_at":"2026-06-29T22:30:24.040Z","repository":{"id":89976157,"uuid":"62827400","full_name":"LasseHaslev/vue-dropzone","owner":"LasseHaslev","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-17T21:06:20.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T13:18:26.342Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/LasseHaslev.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":"2016-07-07T17:55:10.000Z","updated_at":"2017-10-04T18:18:08.000Z","dependencies_parsed_at":"2023-05-26T21:15:32.880Z","dependency_job_id":null,"html_url":"https://github.com/LasseHaslev/vue-dropzone","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LasseHaslev%2Fvue-dropzone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LasseHaslev%2Fvue-dropzone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LasseHaslev%2Fvue-dropzone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LasseHaslev%2Fvue-dropzone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LasseHaslev","download_url":"https://codeload.github.com/LasseHaslev/vue-dropzone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240356192,"owners_count":19788513,"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-09T19:14:40.406Z","updated_at":"2026-06-29T22:30:21.920Z","avatar_url":"https://github.com/LasseHaslev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @lassehaslev/vue-dropzone\n\u003e Drop upload with Vue2\n\n## Install\nRun ```npm install @lassehaslev/vue-dropzone --save``` in your project folder\n\n## Usage\n```js\nimport {Dropzone} from '@lassehaslev/vue-dropzone';\nexport default {\n    template: `\n        \u003csection class=\"section\"\u003e\n            \u003cdiv class=\"container\"\u003e\n                \u003ch1 class=\"title\"\u003eNormal dropzone\u003c/h1\u003e\n                \u003cdropzone @state-change=\"onStateChanged\" @upload=\"onUpload\" @error=\"onError\" url=\"http://localhost:1337/api/images\" ref=\"dropzone\"\u003e\n                    \u003cdiv style=\"width: 300px; height:300px;\" :style=\"{ 'background-color': color }\"\u003e\u0026nbsp;\u003c/div\u003e\n                \u003c/dropzone\u003e\n            \u003c/div\u003e\n\n            \u003cdiv v-for=\"file in files\"\u003e\n                {{ file.name }}\n            \u003c/div\u003e\n        \u003c/section\u003e\n    `,\n\n    data() {\n        return {\n            color: '#FF0000',\n            files: [],\n        }\n    },\n\n    methods: {\n        onStateChanged( enter ) {\n            this.color = enter ? '#0000FF' : '#FF0000';\n        },\n        onUpload( file ) {\n            this.files.push( file );\n        },\n        onError( response ) {\n            console.log('Error');\n            console.log(response);\n        },\n    },\n\n    components: {\n        Dropzone,\n    },\n}\n```\n\n#### Build your own\n```js\nimport BaseDropzone from './BaseDropzone';\nexport default {\n    template: `\n        \u003cdiv\u003e\n            \u003cform \n                @dragover.stop.prevent=\"addDragOver\"\n                @dragenter.stop.prevent=\"addDragOver\"\n\n                @dragleave.stop.prevent=\"removeDragOver\"\n                @dragend.stop.prevent=\"removeDragOver\"\n                @drop.stop.prevent=\"drop\"\n\n                @submit.prevent=\"submit\"\n\n                @click=\"onClick\"\n\n                method=\"post\" action=\"\" enctype=\"multipart/form-data\"\u003e\n\n                \u003cslot\u003e\u003c/slot\u003e\n            \u003c/form\u003e\n            \u003cinput v-if=\"multiple\" @change=\"inputChanged\" style=\"visibility:hidden; position:aboslute;top: -99999; left:-9999999;\" type=\"file\" :name=\"name\" multiple /\u003e\n            \u003cinput v-else @change=\"inputChanged\" style=\"visibility:hidden; position:aboslute;top: -99999; left:-9999999;\" type=\"file\" :name=\"name\" /\u003e\n        \u003c/div\u003e\n    `,\n    mixins: [ BaseDropzone ],\n}\n```\n\n## Development\n\n``` bash\n# install dependencies\nnpm install\n\n# serve with hot reload at localhost:8080\nnpm run dev\n\n# build for production with minification\nnpm run build\n```\n\nFor detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flassehaslev%2Fvue-dropzone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flassehaslev%2Fvue-dropzone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flassehaslev%2Fvue-dropzone/lists"}