File Importer

Permalink
When you add a file with the File Importer, how can you set the files description at the same time?

Thanks

pvernaglia
 
Mnkras replied on at Permalink Reply
Mnkras
can't you just click on the text "Description"
pvernaglia replied on at Permalink Reply
pvernaglia
I'm uploading with a form, not in the file manager
Mnkras replied on at Permalink Reply
Mnkras
the file importer (library) returns a FileVersion object, so you can do all sorts of fun stuff with that,
andrew replied on at Permalink Reply
andrew
Yeah. Try using $fv->updateDescription($description) on the object resulting from the import routine.

Other methods are listed here:

http://www.concrete5.org/documentation/developers/files/files-and-f...
pvernaglia replied on at Permalink Reply
pvernaglia
does $fv = FileImporter::import();  get me the object after the import is done?
Should I just need to do this?
$fv = FileImporter::import();
$fv->updateDescription($description);
That doesn't work for me
Mnkras replied on at Permalink Reply
Mnkras
After you add the file the file version object is returned, just do it on
that
On May 17, 2011 4:42 PM, "Concrete5 Community" <discussions@concretecms.com>
wrote:
pvernaglia replied on at Permalink Reply
pvernaglia
"just do it" it isn't getting me there... I maybe described the problem here in Leaders better??

http://www.concrete5.org/developers/pro-accounts/community-leaders-...
Mnkras replied on at Permalink Reply
Mnkras
can you post the code for the upload?
pvernaglia replied on at Permalink Reply
pvernaglia
thanks. got it from Ryan