ad 1) You have to use the path constant MEDIA to identify where the files are stored and then combine it with the information for the requested file - directory and filename - adding it all together to get the filename with path information. Read the configuration for the Media plugin here: https://github.com/davidpersson/media/blob/1.3/config/core.php
ad 2) PUT, is that not about REST then? Enjoy, John On Feb 25, 8:23 pm, "will.brooke" <will.bro...@gmail.com> wrote: > Hi All, > I am trying to use the media plugin (https://github.com/davidpersson/ > media) for a funky API project. I have 2 issues right now. > > I can POST susbmit a file and it gets saved. huzzah. (if you care, > they are CSV files) > > what I need is: > > 1.) after save completes in the controller, I need the path and > filename (the actual stored filename on disk) of the just submitted > file. i need this to pass to a function in the model that calls a > postgres function that then handles the CSV file. > > i assumed i could get this via something like: $this->Attachment- > > >basepath but no such luck. > > 2.) I would like to use PUT to submit the file. other than re-routing > the edit behaviour, i can't wrap my head around how to handle this. > > any help greatly appreciated -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php