简体   繁体   English

blueimp基于前缀从服务器加载文件

[英]blueimp load files from server based on a prefix

I use bluimp for file management, server side with php. 我使用bluimp进行文件管理,服务器端使用php。 When I upload the images I generate id's on each user and my file looks like 当我上传图片时,我会在每个用户上生成ID,并且我的文件看起来像

exmp. 12__filename.pdf

on next when I open bluimp interface I would like to load files based on my prefix 12__ and I do not find a way how can I pass this id 12 to bluimps php. 接下来,当我打开bluimp接口时,我想基于我的前缀12__加载文件,但是我没有找到一种方法将该id 12传递给bluimps php。

I see the trigger script but how can I pass extra parameters on load 我看到了触发脚本,但是如何在加载时传递额外的参数

$('#fileupload').fileupload({
                // Uncomment the following to send cross-domain cookies:
                //xhrFields: {withCredentials: true},
                url: 'some url',
            });

Update 更新资料

I got it working but is not the cleanest 我可以用,但是不是最干净的

I made some changes in Uploader class (php) 我在Uploader类(php)中进行了一些更改

    protected function get_file_object($file_name) {
      $_GET['id]
      //and validate file_name
}

and I pass the parameter via url like /some_url?id=12 我通过像/some_url?id=12这样的url传递参数

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM