From: LEWIS S. <Stu...@ed...> - 2012-04-30 07:33:02
|
Hi Hayden, === Okay I've tried a couple of methods for adding metadata and completing the deposit. Both: $response = $client->replaceMetadata((string)$response->sac_edit_media_iri, self::USERNAME, self::PASSWORD, self::USERNAME, './tmp/atom2', false); $response = $client->replaceMetadataAndFile((string)$response->sac_edit_media_iri, self::USERNAME, self::PASSWORD, self::USERNAME, './tmp/atom_multipart_package2.zip', false); result in the error: <atom:summary xmlns:atom="http://www.w3.org/2005/Atom">Filename could not be extracted from Content-Disposition</atom:summary><sword:verboseDescription>org.swordapp.server.SwordError: Filename could not be extracted from Content-Disposition Looking at both these methods shows that they call depositAtomEntryByMethod and depositMultipartByMethod but from what I can see, neither of these methods sets the curl Content-Disposition header. Could this be what is causing this error? === I don't think that is what should be causing it - when replacing metadata (the first case, depositing a new atom entry) no filename (content-disposition) is required. See the example in the spec at "6.5.2. Replacing the Metadata of a Resource". In the second case, the problem might be that you're trying to deposit a package (zip file, SWORD v1-style, which requires the use of the deposit() function) using the depositMultipartByMethod function. This requires a multipart file, which can be created using the packager_atom_multipart.php class. For an example of this in use, see test/test-packager-atom_multipart.php Thanks, Stuart -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. |