File name of downloaded resources

65 views
Skip to first unread message

Andreas Richter

unread,
Jun 24, 2021, 2:39:42 AM6/24/21
to resour...@googlegroups.com
Hi,

if I download a resource it is named after its ID.

Is it possible to write the original file name into the downloaded file?

Best,
Andreas

ronnie....@gmail.com

unread,
Jun 25, 2021, 3:40:55 AM6/25/21
to ResourceSpace
Hi Andreas,

it is possible with this setting in config.php:

## Use original filename when downloading a file?
$original_filenames_when_downloading = true;

Best,
Ronnie

Andreas Richter

unread,
Jun 25, 2021, 7:16:05 AM6/25/21
to resour...@googlegroups.com
Great, thanks a lot!
Best, Andreas

--
ResourceSpace: Open Source Digital Asset Management
http://www.resourcespace.com
---
You received this message because you are subscribed to the Google Groups "ResourceSpace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resourcespac...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/resourcespace/8e52ccfe-0209-46e5-8838-e9685b16251cn%40googlegroups.com.

Andreas Richter

unread,
Jun 28, 2021, 4:04:28 AM6/28/21
to resour...@googlegroups.com
Dear Ronnie,

the lines you requested were implemented into the config.php, but the command doesn't work. 

Downloaded files are still named by its RS-ID only.

Server was restarted.

Any idea, what is missing?

Best, Andreas


Am Fr., 25. Juni 2021 um 09:40 Uhr schrieb ronnie....@gmail.com <ronnie....@gmail.com>:
--

Ronnie Zeiller

unread,
Jun 28, 2021, 10:11:57 AM6/28/21
to ResourceSpace
Hi Andreas,

by default (config.default.php) in a fresh installation downloads should look like:

RS<id-of-resource>_<original-file-name>.<extension>

You could try to put into config.php:
$prefix_filename_string = 'test';

If this doesn't change your downloads then I would try to deactivate plugins as they could override config settings.
If this also doesn't change anything, (and you are on version > 8.x) then  I'm afraid I can't help you as it is beyond my knowledge.


Stefano Del Gobbo Acciarretti

unread,
Jun 29, 2021, 7:19:40 AM6/29/21
to ResourceSpace
It works also for suffix for low res image on download (-scr -lpr)?
Thanks

Andreas Richter

unread,
Jun 29, 2021, 8:22:50 AM6/29/21
to resour...@googlegroups.com
Dear Ronnie,

to add a string as a prefix works fine!

I guess the value for the variable <filenames_original> is missing.

Where does that come from? Is there another line missing in the config.php file?

Best,
Andreas

Ronnie Zeiller

unread,
Jun 29, 2021, 10:51:23 AM6/29/21
to ResourceSpace
Aaahh, found another setting in config, may be this will help?

#Option for downloaded filename to be just <resource id>.extension, without indicating size or whether an alternative file. Will override $original_filenames_when_downloading which is set as default
$download_filename_id_only = false;

# Append the size to the filename when downloading
# Required: $download_filename_id_only = true;
$download_id_only_with_size = false;

And then: is the original filename stored in your installation? 
Do you see the original filename in RS?



Reply all
Reply to author
Forward
0 new messages