Hi Bill,

The DSpace 7 UI *must* redirect to the backend in order to perform the 
download. Otherwise, you'd need to "stream" the file to the UI first, then 
send it to the user.

So, the behavior you are seeing is correct... 

In the UI, the link will always appear like this: 
https://[dspace.ui.url]/bitstreams/[uuid-of-bitstream]/download

However, when a user clicks that link, they are redirected (by the UI) to 
download the file via the backend:
https://[dspace.server.url]/api/core/bitstreams/[uuid-of-bitstream]/content

Notice that the *first* URL will always be based on the "dspace.ui.url" 
setting (i.e. the URL of the UI), which is required for SEO/indexing 
purposes, etc.  However, it necessarily will redirect/send you to the 
"dspace.server.url" (i.e. the URL of the REST API) in order to download the 
file.... this is necessary for performance purposes, so the backend can 
"stream" the file directly to the user's browser.

Hopefully that clarifies things further.  But, let us know if it brings up 
more questions.

Tim

On Tuesday, March 21, 2023 at 1:54:10 PM UTC-5 tant...@umn.edu wrote:

> That's helpful, and the new style is actually more predictable, however, 
> in my instance when I click on a bitstream link I am redirected to a new 
> url that looks like a REST endpoint, for example
>
>
> https://xxx.xxx.xxx/server/api/core/bitstreams/12ea09a7-d9aa-4666-9a51-aef6358351a5/content
>
> It would be preferable to see the url as it appears to the client, for 
> example
>
>
> https://xxx.xxx.xxx/bitstreams/12ea09a7-d9aa-4666-9a51-aef6358351a5/download
>
> Any thoughts?
>
> On Monday, March 20, 2023 at 10:29:44 AM UTC-5 Tim Donohue wrote:
>
>> Hi Jan,
>>
>> DSpace 7 doesn't provide an option to have a Bitstream (File) download 
>> link based on an Item's assigned Handle.  Instead, download links *are* 
>> persistent and public, but are based on the UUID of the Bitstream/file like 
>> this:
>> https://[dspace.url]/bitstreams/[uuid-of-bitstream]/download
>>
>> That said, DSpace 7 does auto-redirect all older style 6.x URLs to the 
>> new location.  So, for example, in the DSpace 6.x XMLUI, file downloads 
>> used this URL structure:
>> https://[dspace.url]/bitstream/handle/[prefix]/[suffix]/[filename]
>>
>> Those older URLs will redirect automatically to the new URL style (shown 
>> above), in case that's helpful.
>>
>> Tim
>>
>> On Thursday, March 16, 2023 at 5:36:22 AM UTC-5 jan.b...@gmail.com wrote:
>>
>>> Any idea? We need a software solution to generate public links for PDF 
>>> downloads using only a given handle number.
>>> Thanks
>>>
>>> On Wednesday, March 8, 2023 at 8:55:06 AM UTC+1 Jan Broulím wrote:
>>>
>>>> Hi,
>>>> I would like to ask whether it is possible to generate a public link 
>>>> for pdf download - e.g. based on handle number.
>>>> Thank you
>>>> Jan
>>>>
>>>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
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 dspace-tech+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/c696f211-4c2d-4ede-a756-69a6866b10d1n%40googlegroups.com.

Reply via email to