url missing when i upload a file
- Single Page
Posted 16 October 2012 - 14:56 PM
This is my Post response when i upload the file:
{"success":true,"files":[{"name":"64c32-b7920-Personal_6250.pdf","size":21896,"type":"application\/pdf","url":"http:\/\/localhost\/controlate\/assets\/uploads\/files\/2012\/Octubre\/64c32-b7920-Personal_6250.pdf"}]}
In my computer was successfuly saved, but when i go to the list, the url file it's like this:
http://localhost/controlate//64c32-b7920-Personal_6250.pdf
and it should be like this:
http://localhost/controlate/[font=monospace]assets/uploads/files/2012/Octubre[/font]/64c32-b7920-Personal_6250.pdf
How can I change this file link before saving the data?
Any help?¡? thanks!
Posted 16 October 2012 - 21:19 PM
As I see your upload path is based on the date (from your previous topic).
You can create an extra field "path" in your table.
When you save a file, you should to insert the path into this field.
when you show a list you can use a callback_column :
.
return $row->path."/".$row->image
P.S My English is bad))
Posted 18 October 2012 - 13:20 PM
[color=#000000][font=Arial, Helvetica, sans-serif][size=2]Undefined property: stdClass::$image [/size][/font][/color]
when I return $row->path.'/'.$row->image
Posted 18 October 2012 - 15:17 PM