{"id":22468100,"url":"https://github.com/patternslib/pat-upload","last_synced_at":"2025-08-02T08:31:51.498Z","repository":{"id":21931079,"uuid":"25255458","full_name":"Patternslib/pat-upload","owner":"Patternslib","description":"A pattern to create a drop area for upload of multiple files","archived":false,"fork":false,"pushed_at":"2023-04-07T21:07:12.000Z","size":2913,"stargazers_count":1,"open_issues_count":17,"forks_count":2,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-18T01:41:17.137Z","etag":null,"topics":["hacktoberfest","javascript","patternslib","ui-components"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"wenzhixin/bootstrap-table","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Patternslib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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":"2014-10-15T13:21:35.000Z","updated_at":"2022-10-16T15:29:28.000Z","dependencies_parsed_at":"2024-10-04T10:15:02.966Z","dependency_job_id":"89b61888-2dfd-4525-86bc-9bdf20bec3c2","html_url":"https://github.com/Patternslib/pat-upload","commit_stats":{"total_commits":161,"total_committers":14,"mean_commits":11.5,"dds":"0.49068322981366463","last_synced_commit":"76c0b3f5f340063c25497af410215879c5de0555"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patternslib%2Fpat-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patternslib%2Fpat-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patternslib%2Fpat-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Patternslib%2Fpat-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Patternslib","download_url":"https://codeload.github.com/Patternslib/pat-upload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228453997,"owners_count":17922584,"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":["hacktoberfest","javascript","patternslib","ui-components"],"created_at":"2024-12-06T11:15:06.310Z","updated_at":"2024-12-06T11:15:07.055Z","avatar_url":"https://github.com/Patternslib.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#pat-upload\n\nA pattern that creates a drop area for uploading multiple files.\n\nBased on [DropzoneJS](https://www.dropzonejs.com/).\n\n##demo\n\nTo view a demo of how this pattern works, clone the repository:\n\n    git clone https://github.com/Patternslib/pat-upload.git\n\nThe run the Makefile:\n\n    make\n\nAnd then in your browser open: http://localhost:4001\n\n\n## Form protection\n\nSome systems allow to pass a authentication token to protect against CSRF attacks.\nYou can do this with pat-upload by adding a URL parameter, even if the upload happens in a POST request.\nThis is a valid practice, see: https://stackoverflow.com/a/1592446/1337474\n\nFor example, for a plone.protect style token, do:\n\n      \u003cfieldset class=\"pat-upload\"\n                data-pat-upload=\"url: https://example.com/upload?_authenticator=TOKEN\"\n      \u003e\n      \u003c/fieldset\u003e\n\n\n## Documentation\n\nProperty | Value | Default | Type | Description\n---------|-------|---------|------|------------\najax-upload | `true`, `false` | `true` | boolean | For letting the widget upload the files via ajax. If false the form will act like a normal form.\npost-upload | `true`, `false` | `true` | boolean | Condition value for the file preview in div element to fadeout after file upload is completed.\nbase-url | _url string_ | _null_ | string | To be used in conjunction with relative-path to.\nclass-name | _class name_ | `upload` | string | Value for class attribute in the form element.\nclickable | `true`, `false` | `false` | boolean | If you can click on container to also upload.\ncurrent-path | _path string_ | _null_ | string | Current path related items is starting with.\nlabel | *string* | `Drop files here…` | string | Label text to show on the upload zone.\nname | _name attr_ | `file` | string | Value for name attribute in the file input element.\npreviews-container | | `.previews` | selector | JavaScript selector for file preview in div element.\ntrigger | _trigger name_ | `button` | string | What triggers the upload.  'button' expects user to click upload button, 'auto' starts uploading automatically after the user drags something, and always hides the upload button.\nurl | _url string_ | _null_ | string | If not used with a form, this option must provide the URL to submit to.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatternslib%2Fpat-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatternslib%2Fpat-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatternslib%2Fpat-upload/lists"}