That's works beautifully. Cheers Mike.
---------------------------------------------------- Michael Ross - Pan Leeds Web Developer Health Informatics Service Tel: (0113) 305 7417 2nd Floor Fax: (0113) 305 7398 North West House West Park Ring Road West Park Leeds LS16 6QU -----Original Message----- From: Marcin Soltysiak [mailto:[EMAIL PROTECTED] Sent: 09 December 2004 11:22 To: [EMAIL PROTECTED] Subject: Re: [midgard-user] Attachments > I am writing a script at the moment that will allow users to select an > article and download all the attachments in that article in one go. The way > I want to do this is to save the attachments to a temp folder, zip them up > and then send the zip file via web browser to the user. > > Does anyone know how to save an attachment to local disk? I had thought it > would have something to do with the 'location' field, but it always appears > to be blank. > > $objectentry is the article object. This script happily displays all the > attachment details such as name, but location is always blank. > > $attach_list = $objectentry->listattachments(); > while ($attach_list->fetch()) { > echo("Got attachment ".$attach_list->name." with location > ".$attach_list->location; > } > > Any ideas would be most appreciated. Hint: filehandle mgd_open_attachment (int id, string [mode]) opens an attachment file mode is compatible with fopen() Solt --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
