Skip to content

Commit

Permalink
Added options to define the upload/download template IDs.
Browse files Browse the repository at this point in the history
  • Loading branch information
blueimp committed Feb 28, 2012
1 parent 442856e commit 3f5c97b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions js/jquery.fileupload-ui.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery File Upload User Interface Plugin 6.5.2
* jQuery File Upload User Interface Plugin 6.5.3
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
Expand Down Expand Up @@ -65,6 +65,10 @@
// if supported by the browser. Set the following option to false
// to always display preview images as img elements:
previewAsCanvas: true,
// The ID of the upload template:
uploadTemplateId: 'template-upload',
// The ID of the download template:
downloadTemplateId: 'template-download',
// The expected data type of the upload response, sets the dataType
// option of the $.ajax upload requests:
dataType: 'json',
Expand Down Expand Up @@ -559,11 +563,12 @@
},

_initTemplates: function () {
this.options.templateContainer = document.createElement(
var options = this.options;
options.templateContainer = document.createElement(
this._files.prop('nodeName')
);
this.options.uploadTemplate = tmpl('template-upload');
this.options.downloadTemplate = tmpl('template-download');
options.uploadTemplate = tmpl(options.uploadTemplateId);
options.downloadTemplate = tmpl(options.downloadTemplateId);
},

_initFiles: function () {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blueimp-file-upload",
"version": "6.5.2",
"version": "6.5.3",
"title": "jQuery File Upload",
"description": "File Upload widget with multiple file selection, drag&drop support, progress bars and preview images for jQuery. Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.",
"keywords": [
Expand Down

0 comments on commit 3f5c97b

Please sign in to comment.