Search code examples
pdfdspace

Location of pdf files in dspace server


I was wondering where in the live server files, can I find the pdf files I submitted in my DSpace instance? Does anyone knows where it is located? any help would be very much appreciated


Solution

  • Given a handle and a bitstream id number, you can get to the path for your file with the following query. By default your bitstream_id will be 1 unless you have added/removed bitstreams from your item.

    select 
      '${YOUR_ASSETSTORE_PATH}' || 
      substring(bit.internal_id, 1, 2) || '/' || 
      substring(bit.internal_id, 3, 2) || '/' || 
      substring(bit.internal_id, 5, 2) || '/' || 
      bit.internal_id 
    from bitstream bit 
    inner join bundle2bitstream b2b on b2b.bitstream_id=bit.bitstream_id 
    inner join bundle b on b.bundle_id=b2b.bundle_id and b.name='ORIGINAL' 
    inner join item2bundle i2b on i2b.bundle_id=b.bundle_id 
    inner join handle h on i2b.item_id=h.resource_id 
    where h.handle='${handle}' and bit.sequence_id =${seq};