Modify

Opened 9 years ago

Closed 9 years ago

#2222 closed enhancement (fixed)

RFE: Optionally use the filenames as key for download items

Reported by: Kis Gergely Owned by: Radek Bartoň
Priority: high Component: DownloadsPlugin
Severity: minor Keywords:
Cc: Trac Release: 0.10

Description

The attached patch adds a new feature to DownloadsPlugin. If the filename_key = true option is set, the filenames are required to be unique and the generated download links include the filename instead of the download id.

This feature is used on http://oss.euedge.com, because the various source based distributions (MacPorts, Gentoo Portage) require specific naming conventions for the download links + it is nice to have the filename in the link (in our opinion) .

Could you please apply this patch? It is completely non-intrusive, can be switched on and off with graceful degradation: that is if the filenames are not unique it is undeterministic which file will be downloaded. The feature is off by default.

The patch can be applied with:

cd 0.10
patch -p6 .../dlbyname.diff

Attachments (1)

dlbyname.diff (13.0 KB) - added by Kis Gergely 9 years ago.
Download by name patch for DownloadsPlugin

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by Kis Gergely

Attachment: dlbyname.diff added

Download by name patch for DownloadsPlugin

comment:1 Changed 9 years ago by Radek Bartoň

Priority: normalhigh
Severity: normalminor
Status: newassigned
Summary: Patch: Optionally use the filenames as key for download itemsRFE: Optionally use the filenames as key for download items

Thanks for your patch. I'll apply it together with port to 0.11 which I've recieved today. This may take a week or two since I'm too busy to do that right now.

comment:2 Changed 9 years ago by Radek Bartoň

Resolution: fixed
Status: assignedclosed

I applied you patch to 0.11 branch with few modificatoins. Main difference is filename_key option renamed to unique_filename. I don't want to append new features to 0.10 branch since 0.11 is develpped so if you really want this in 0.10, let me know.

Modify Ticket

Action
as closed The owner will remain Radek Bartoň.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.