Skip to content

Instantly share code, notes, and snippets.

@elmariachi111
Last active October 5, 2024 22:27
Show Gist options
  • Save elmariachi111/5407282 to your computer and use it in GitHub Desktop.
Save elmariachi111/5407282 to your computer and use it in GitHub Desktop.
JQuery-File-Upload templates written in Mustache / Handlebars
<tr class="template-download fade">
{{#error}}
<td></td>
<td class="name"><span>{{name}}</span></td>
<td class="size"><span></span></td>
<td class="error" colspan="2">
<span class="label label-important">{{error}}</span></td>
{{/error}}
{{^error}}
<td class="preview">
{{#thumbnail_url}}
<a href="{{url}}"><img src="{{thumbnail_url}}"></a>
{{/thumbnail_url}}
</td>
<td class="name">
<a href="{{url}}">{{name}}</a>
</td>
<td class="size"><span>{{fmtFileSize}}</span></td>
<td colspan="2"></td>
{{/error}}
<td>
<button class="btn btn-danger delete" data-type="{{delete_type}}" data-url="{{delete_url}}">
<i class="icon-trash icon-white"></i>
<span>Delete</span>
</button>
<input type="checkbox" name="delete" value="1" class="toggle">
</td>
</tr>
<tr class="template-upload fade">
<td class="preview"><span class="fade"></span></td>
<td class="name">{{name}}</td>
<td class="size">{{fmtFileSize}}</td>
{{#error}}
<td class="error" colspan="2">{{error}}</td>
{{/error}}
{{^error}}
<td>
<div class="progress">
<div class="bar" style="width:0%;"></div>
</div>
</td>
<td>
<button class="btn btn-primary start">
<i class="icon-upload icon-white"></i>
<span>Start</span>
</button>
</td>
<td>
<button class="btn btn-warning cancel">
<i class="icon-ban-circle icon-white"></i>
<span>Cancel</span>
</button>
</td>
{{/error}}
</tr>
@vikaschauhan1
Copy link

can anyone help me?
I have set the autoUpload to true so that I don't need to complete the upload process in two steps i.e - first select and then click on start upload.
What is happening in my case it is not displaying after selection but when I refresh the page it appears so there may be some response error in autouploading.
Please help me I am new to this.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment