From: Jon P. <jo...@cr...> - 2007-04-23 16:57:08
|
On Mon, 2007-04-23 at 13:12 +0200, Marcus Clements wrote: > Hi, > > Some questions: > > Is there a variable in cchost which contains the local file root (as > in /home/foo/bar/my_cchost_install)? > > Our Cchost (in dev) has a built-in flash sequencer for music students > to learn about production. The sequencer saves XML song files on the > server and there is a submit form to upload publish the songs into the > cchost system. > > To achieve this I've inherited from existing classes and added custom > methods (see below) > I can publish the file ok but the upload listings have broken file > page URLs. > Where is the ['file_page_url'] attribute added to the upload record? > I've hacked a fix by adding the value to the record in > CCMediahost::OnUploadRow() > > I did notice this: > > <code> > // NOTE: This hopefully didn't break anything ;) > if ( ! isset($file['download_url']) ) { > continue; > } > </code> Oh, that is not in the latest code. What version are you using? I added because of some faulty uploads... Jon > I've inherited from CCUpload : > > <code> > class MOUpload extends CCUpload { > > function PostProcessNewUploadForm( &$form, $ccud_tags, > $relative_dir, $username, $parents = null) > { > $form->GetFormValues($values); > $current_path = > '/home/ccdev18/ccdev18.dreamhosters.com/sequencer/songs/'.$username.'/'.$values['upload_file_name']; > $new_name = $values['upload_file_name']; > $user_tags = $values['upload_tags']; > > // All fields here that start with 'upload_' are > // considered to be fields in the CCUploads table > // so.... > // Destroy the $_FILES object so it doesn't get > // confused with that > CCDebug::Log("IN MOPostProcessNewUploadForm"); > CCDebug::Log($current_path); > > > unset($values['upload_file_name']); > > require_once('cclib/cc-uploadapi.php'); > > $ret = CCUploadAPI::PostProcessNewUpload( $values, > $current_path, > $new_name, > $ccud_tags, > $user_tags, > $relative_dir, > $parents ); > > if( is_string($ret) ) > { > $form->SetFieldError('upload_file_name',$ret); > return(0); > } > > return($ret); > } > } > </code> > > Thanks for taking a look. > > Marcus > > > > > > -- > Marcus Clements > > www.brightonart.org > www.rocketfestival.com > www.innerfield.co.uk > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ Cctools-cchost mailing list Cct...@li... https://lists.sourceforge.net/lists/listinfo/cctools-cchost -- Jon Phillips jo...@cr... cell: 510.499.0894 Community/Business Developer Creative Commons www.creativecommons.org |