Google Groups

Re: [atk4] Download file from filestore

Janis Volbergs Apr 18, 2012 2:42 AM
Posted in group: Agile Toolkit Developers

One way:

class MyGrid extends Grid {
function init(){
$this->fm = $this->add("filestore/Model_File");
function formatRow(){

$src = $this->fm->getPath();
$name = $this->fm->get("name");

$this->current_row_html["batch_file"] = "<a href='$src'>$name</a>";

then use in page $this->add("MyGrid");

n.b. above is for 4.2
p.s. not parsed.

On Apr 18, 2012, at 12:35 PM, Riccardo Lorini wrote:

i create a simple model with name, text and one file , that i insert using the crud and filestore funcionalities.

This is the model code :

class Model_Batch extends Model_Table {

public $entity_code='batch';
    public $table_alias='ba';
    function init(){




Now my question is :  How can i download or show the file in an MVCgrid ? 
Actually the MVCgrid shows me the file ID , i need to connect the name with the file.

Thank you

FYI: If amount of emails you receive from this group is too much - switch to "Digest" mode. You'll receive no more than 1 email per day.
To post to this group, send email to
To unsubscribe and view archive:
To download Agile Toolkit, visit: