Hi Joan,

Trying to add a pdf in a existing DSpace item : (  seems to work fine,
but when I'm checking it, the new file doesn't appear )

curl -i --data-binary "/home/jcaparros/example/pdf1.pdf" -H
"Content-Disposition: filename=somepdf.pdf" -H "Content-Type:
application/pdf" -H "X-No-Op: true" -H "X-Verbose: true"
http://user:p...@localhost:8080/sword/deposit/123456789/4 

Removing temporary files from
disk; [2009-07-15 07:48:51.832] Database changes aborted; [2009-07-15
07:48:51.833] NoOp Requested: Removed all traces of submission;
[2009-07-15 07:48:51.834] Total time for deposit processing: 420 ms;
</sword:verboseDescription>
   <sword:noOp>true</sword:noOp>
 
The problem here is that you have set the X-No-Op header, so the deposit
is not actually taking place.

Reading the zip file to add a new item : ( Something is wrong and the
log files say 2009-07-15 08:36:02,498 ERROR
org.purl.sword.server.DepositServlet @
org.purl.sword.base.SWORDErrorException: Unacceptable content type in
deposit request: application/zip )

curl -i --data-binary "/home/jcaparros/exemple/example.zip" -H
"Content-Disposition: filename=myDSpaceMETSItem.zip" -H "Content-Type:
application/zip" -H "X-Packaging:
http://purl.org/net/sword-types/METSDSpaceSIP"; -H "X-No-Op: false" -H
"X-Verbose: true"
http://user:p...@localhost:8080/sword/deposit/123456789/3

 

Try changing the '-data-binary "/home/jcaparros/example/example.zip"' to
include an @ at the start of the filename. Without the '@', curl sends
the string, rather than the file. So use '-data-binary
"@/home/jcaparros/example/example.zip"' instead.

 

Hope that helps,

 

 

Stuart Lewis

IT Innovations Analyst and Developer

Te Tumu Herenga The University of Auckland Library

Auckland Mail Centre, Private Bag 92019, Auckland 1142, New Zealand

Ph: 64 9 373-7599 x81928

http://www.library.auckland.ac.nz <http://www.library.auckland.ac.nz/> /

 

 

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to