0

I am having trouble deleting the files with jquery fileupload . by clicking delete the error happens , do not delete the file . Error message:

upload/server/php/index.php?file=xxxx.png 406 (Not Acceptable)
Jose Ricardo Bustos M.
  • 8,016
  • 6
  • 40
  • 62
lelopes
  • 111
  • 6
  • see [this question about 406 errors](http://stackoverflow.com/questions/14251851/what-is-406-not-acceptable-response-in-http). If you want us to help you more, you need to add some code about how the HTTP request is being sent and how your server is set to respond. See this on [how to create a good example of your code](http://stackoverflow.com/help/mcve). – HPierce Sep 17 '15 at 13:56

1 Answers1

0

Hpierce This is the code to which it refers

public function delete($print_response = true){
    $file_names = $this->get_file_names_params();
    if (empty($file_names)) {
        $file_names = array($this->get_file_name_param());
    }
    $response = array();
    foreach($file_names as $file_name) {
        $file_path = $this->get_upload_path($file_name);
        $success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path);
        if ($success) {
            foreach($this->options['image_versions'] as $version => $options) {
                if (!empty($version)) {
                    $file = $this->get_upload_path($file_name, $version);
                    if (is_file($file)) {
                        unlink($file);
                    }
                }
            }
        }
        $response[$file_name] = $success;
    }
    return $this->generate_response($response, $print_response);
}

I have the same problem