【问题标题】:blueimp/jQuery-File-Upload - change upload pathblueimp/jQuery-File-Upload - 更改上传路径
【发布时间】:2017-09-12 19:02:21
【问题描述】:

我尝试使用 blueimp/jQuery-File-Upload 将图像上传到我的服务器。 main.jsapp.js中默认路径设置为server/php,文件保存到server/php/files/

但是,我需要将其保存到另一个位置:fotos

我尝试将 server/php/UploadHandler.php 中的 upload_dirupload_url 更改为 fotos/

public function __construct($options = null, $initialize = true, $error_messages = null) {
    $this->response = array();
    $this->options = array(
        'script_url' => $this->get_full_url().'/'.$this->basename($this->get_server_var('SCRIPT_NAME')),
        'upload_dir' => 'fotos/',
        'upload_url' => 'fotos/',

但是图片没有上传到新路径。

【问题讨论】:

    标签: blueimp


    【解决方案1】:

    fotos/ 必须是 /fotos/

    以正斜杠开始,以正斜杠结束。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-05-19
      • 1970-01-01
      • 2015-03-06
      • 2016-04-11
      • 2018-05-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多