Note that there are some explanatory texts on larger screens.

plurals
  1. POhow can I filter the files for download in the blueimp jquery download program
    primarykey
    data
    text
    <p>I'm trying to use the Blueimp jQuery File Upload File program <a href="https://github.com/blueimp/jQuery-File-Upload" rel="nofollow">https://github.com/blueimp/jQuery-File-Upload</a>. I've searched through wiki &amp; documentation but couldn't find an answer to how to filter the files available for download. </p> <p>I am using it inside an authenticated 'protected' area. I have successfully prepended all my uploaded files with a unique id ( e.g. UID-filename.jpg ), which I will have available in the authenticated session. So all I have to do is select only the ones with the correct UID.</p> <p>The jquery code that shows the download table is :</p> <pre><code>&lt;!-- The template to display files available for download --&gt; &lt;script id="template-download" type="text/x-tmpl"&gt; {% for (var i=0, file; file=o.files[i]; i++) { %} &lt;!-- &lt;tr class="template-download fade"&gt;--&gt; &lt;tr class="template-download "&gt; {% if (file.error) { %} &lt;td&gt;&lt;/td&gt; &lt;td class="name"&gt;&lt;span&gt;{%=file.name%}&lt;/span&gt;&lt;/td&gt; &lt;td class="size"&gt;&lt;span&gt;{%=o.formatFileSize(file.size)%}&lt;/span&gt;&lt;/td&gt; &lt;td class="error" colspan="2"&gt;&lt;span class="label label-important"&gt;{%=locale.fileupload.error%}&lt;/span&gt; {%=locale.fileupload.errors[file.error] || file.error%}&lt;/td&gt; {% } else { %} &lt;td class="preview"&gt;{% if (file.thumbnail_url) { %} &lt;a href="{%=file.url%}" title="{%=file.name%}" rel="gallery" download="{%=file.name%}"&gt;&lt;img src="{%=file.thumbnail_url%}"&gt;&lt;/a&gt; {% } %}&lt;/td&gt; &lt;td class="name"&gt; &lt;a href="{%=file.url%}" title="{%=file.name%}" rel="{%=file.thumbnail_url&amp;&amp;'gallery'%}" download="{%=file.name%}"&gt;{%=file.name%}&lt;/a&gt; &lt;/td&gt; &lt;td class="size"&gt;&lt;span&gt;{%=o.formatFileSize(file.size)%}&lt;/span&gt;&lt;/td&gt; &lt;td colspan="2"&gt;&lt;/td&gt; {% } %} &lt;td class="delete"&gt; &lt;button class="btn btn-danger" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}"&gt; &lt;i class="icon-trash icon-white"&gt;&lt;/i&gt; &lt;span&gt;{%=locale.fileupload.destroy%}&lt;/span&gt; &lt;/button&gt; &lt;input type="checkbox" name="delete" value="1"&gt; &lt;/td&gt; &lt;/tr&gt; </code></pre> <p>I'm not very experienced in JS/Jquery. I would appreciate any ideas on what to do next. is anyone familiar with a setting/option to filter these files. Alternatively, I assume that file is array of filenames or paths which i suspect could be filtered.In PHP I'd probably use the glob function .Does anyone have any experience with this in JS?</p> <p>Thank you in advance,</p> <p>Bill</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload