Hi Paul,

as the name must not be unique, you will need the UUID or legacy ID to
delete a bitstream.
You may get a list of all bistreams belonging to an item via the REST API
https://demo.dspace.org/rest/
GET /items/{item id}/bitstreams - Return bitstreams of the specified item.
e.g.
https://demo.dspace.org/rest/items/99819176-b29f-4d18-a4e1-9bf6b93bb443/bitstreams

Hope this helps

Claudia Jürgen


Am 15.01.2018 um 13:27 schrieb Paul Warner:
Hi,

I want to delete a bitstream from an item.  I have a delete_contents file
inside my SimpleArchiveFormat folder.  The delete_contents file has the
filename of the file I want to delete, but I get an error message that
indicates the uuid is needed, not the name of the file.  How do I get the
uuid of the file from the command line?

Below is the command and the error message.

Best regards,
Paul


command:

bin/dspace itemupdate -e [email protected] -s
/opt/dspace/SimpleArchiveFormat_421000732 --deletebitstreams

Error message:

Exception processing item item_1: java.lang.IllegalArgumentException:
Invalid UUID string: test_421000732.pdf
java.lang.IllegalArgumentException: Invalid UUID string: test_421000732.pdf
at java.util.UUID.fromString(UUID.java:194)
at
org.dspace.content.BitstreamServiceImpl.findByIdOrLegacyId(BitstreamServiceImpl.java:426)
at
org.dspace.content.BitstreamServiceImpl.findByIdOrLegacyId(BitstreamServiceImpl.java:41)
at
org.dspace.app.itemupdate.DeleteBitstreamsAction.execute(DeleteBitstreamsAction.java:66)
at org.dspace.app.itemupdate.ItemUpdate.processArchive(ItemUpdate.java:442)
at org.dspace.app.itemupdate.ItemUpdate.main(ItemUpdate.java:355)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)


--
Claudia Juergen
Eldorado

Technische Universität Dortmund
Universitätsbibliothek
Vogelpothsweg 76
44227 Dortmund

Tel.: +49 231-755 40 43
Fax: +49 231-755 40 32
[email protected]
www.ub.tu-dortmund.de

Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie ist 
ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für diese 
E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender und 
vernichten Sie diese Mail. Vielen Dank.
Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen 
ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher Schriftform 
(mit eigenhändiger Unterschrift) oder durch Übermittlung eines solchen 
Schriftstücks per Telefax erfolgen.

Important note: The information included in this e-mail is confidential. It is 
solely intended for the recipient. If you are not the intended recipient of 
this e-mail please contact the sender and delete this message. Thank you. 
Without prejudice of e-mail correspondence, our statements are only legally 
binding when they are made in the conventional written form (with personal 
signature) or when such documents are sent by fax.

--
You received this message because you are subscribed to the Google Groups "DSpace 
Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to