Currently with a plugin upload the image to my server, with this plugin (Dropzone.js) carturo the path of this file. I do all this to avoid having to upload the tax file to the database and I only keep the name.
Example upload file capture
var nameAdjunto = "/var/www/html/cartoni/uploads/" +myDropzone.files[0].name;
alert(nameAdjunto);
returns /var/www/html/cartoni/uploads/captura.PNG
The nameAdjunto value I keep in the database
Now I call that image
Model
public function listar($table)
{
$data= $this->db->get($table);
return $data->result();
}
driver:
$data['uploads'] = $this->Model->listar('tabla_upload);
How can I download the file just by taking the route?
How do I build the url to download the file?
<?php echo var_dump($uploads->name) ?>
I hope you have explained to me very well thank you!