{"id":30107063,"url":"https://github.com/benignware/jquery-filepicker","last_synced_at":"2025-08-10T01:33:02.350Z","repository":{"id":14103556,"uuid":"16808013","full_name":"benignware/jquery-filepicker","owner":"benignware","description":"A customizable jquery filepicker component","archived":false,"fork":false,"pushed_at":"2014-05-28T15:10:57.000Z","size":240,"stargazers_count":4,"open_issues_count":4,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-08-12T18:37:44.343Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benignware.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}},"created_at":"2014-02-13T15:55:52.000Z","updated_at":"2023-08-12T18:37:44.344Z","dependencies_parsed_at":"2022-09-04T13:52:05.619Z","dependency_job_id":null,"html_url":"https://github.com/benignware/jquery-filepicker","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/benignware/jquery-filepicker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benignware%2Fjquery-filepicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benignware%2Fjquery-filepicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benignware%2Fjquery-filepicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benignware%2Fjquery-filepicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benignware","download_url":"https://codeload.github.com/benignware/jquery-filepicker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benignware%2Fjquery-filepicker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269663318,"owners_count":24455799,"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","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-08-10T01:32:10.678Z","updated_at":"2025-08-10T01:33:02.270Z","avatar_url":"https://github.com/benignware.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"jquery-filepicker\n=================\n\nA customizable jquery filepicker component. \n\n* Works out-of-the-box with bootstrap and jquery-ui without the need of any further stylesheets\n\nBasic usage\n-----\n\n```html\n\u003cinput data-label=\"Upload\" type=\"file\"/\u003e\n```       \n         \n```js\n$(function() {\n  $(\"input[type='file']\").filepicker();\n})\n```\n\nIf you don't use any of the supported frameworks you can go with the default markup style. \nTherefore you may want to add the corresponding css to your application: \n\n```html\n\u003clink rel=\"stylesheet\" href=\"jquery-filepicker/css/filepicker.default.css\"\u003e\n```\n\nAdvanced usage\n--------------\n\n### Custom style example\nCreate a collapsible filepicker using bootstrap-collapse. \n\n```js\n$(\"input[type='file']\").filepicker({\n  style: {\n    ui: \n      '\u003cdiv class=\"panel-group\" id=\"\u003c%= element.getAttribute(\"id\") + \"_panel_group\" %\u003e\"\u003e' + \n        '\u003cdiv class=\"panel panel-default\"\u003e' + \n          '\u003cdiv class=\"panel-heading\"\u003e' + \n            '\u003ch4 class=\"panel-title\"\u003e' + \n              '\u003ca ' + \n                'data-toggle=\"collapse\" ' + \n                'data-parent=\"#\u003c%= element.getAttribute(\"id\") + \"_panel_group\" %\u003e\" ' + \n                'href=\"#\u003c%= element.getAttribute(\"id\") + \"_panel_collapse\" %\u003e\"\u003e' + \n                'Collapsible File Upload' + \n              '\u003c/a\u003e' + \n            '\u003c/h4\u003e' +\n          '\u003c/div\u003e' + \n          '\u003cdiv id=\"\u003c%= element.getAttribute(\"id\") + \"_panel_collapse\" %\u003e\" class=\"panel-collapse collapse\"\u003e' +\n            '\u003cdiv class=\"panel-body\"\u003e' + \n              '\u003c%= preview %\u003e\u003c%= _build(input, {className: \"form-control\", placeholder: element.placeholder}) %\u003e' + \n            '\u003c/div\u003e' +\n          '\u003c/div\u003e' +  \n        '\u003c/div\u003e' + \n      '\u003c/div\u003e', \n      thumbnail: {\n        wrap: '\u003cdiv class=\"thumbnail\"\u003e\u003c/div\u003e'\n      }\n    }\n  });\n});\n```\nFor more information on the template-structure please refer to [mugine](http://github.com/rexblack/mugine.js).\n\n### Control rendering using callbacks\nAlthough recommended way of customizing markup is by using a style-template, you can handle rendering on your own by making use of the 'renderUI'- and 'renderPreview'-callbacks\n      \n\n```js\n$(function() {\n  $(\"input[type='file']\").each(function() {\n    \n    var ui = null;\n    $(this).filepicker({\n      renderUI: function(element, button, input, preview) {\n        if (!ui) {\n          ui = document.createElement('div');\n          ui.appendChild(button);\n          // we don't want the input here\n          //ui.appendChild(input);\n          ui.appendChild(preview);\n          element.parentNode.insertBefore(ui, element);\n        }\n        button.innerHTML = $(element).data('label');\n        return false;\n      }, \n      renderThumbnail: function(img, file) {\n        $(img).wrap($('\u003cdiv style=\"border: 1px solid #CCCCCC; border-radius: 4px; background: #F5F5F5; padding: 4px; margin: 4px 0;\"\u003e\u003c/div\u003e'));\n        return false;\n      }\n    });\n  });\n});\n```\n\n\nOptions\n-------\n\n#### options.style\nType: `String`\nDefault value: `auto`\n\nCan be one of the following predefined styles `bootstrap`, `jquery-ui`, `default` or `auto`. You can also provide an object containing the properties `ui` and `thumbnail` as [mugine](http://github.com/rexblack/mugine.js)-templates.\n\n#### options.renderUI\nType: `Function`\nDefault value: `null`\n\nOverride rendering ui by providing a callback function with the following arguments `element`, `button`, `input`, `preview`. Return `false` in order to prevent default style-rendering.\n\n#### options.renderThumbnail\nType: `Function`\nDefault value: `null`\n\nOverride thumbnail rendering by providing a callback function with the following arguments `img`, `file`. Return `false` in order to prevent default style-rendering.\n\n#### options.resize\nType: `Function`\nDefault value: `null`\n\nThis callback is fired when the component is resized. \n\n#### options.change\nType: `Function`\nDefault value: `null`\n\nThis callback is fired on file select. A list of all files is provided by the first argument. \n   ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenignware%2Fjquery-filepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenignware%2Fjquery-filepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenignware%2Fjquery-filepicker/lists"}