00904: Attachment vs local customization

Summary: Attachment vs local customization
Created: 2007-03-21 05:45
Status: Open
Category: Feature
From: Dfaure
Assigned:
Priority: 4
Version: 2.2.0-beta
OS: any

Description:

The default attachments definition policy is to have them shared between all pages belonging to the same group with the related setting of:

$UploadPrefixFmt = '/$Group';

and in order to have (at least one) group of pages where each of them would have their own set of attachements, we could set:

$UploadPrefixFmt = '/$FullName';

in the related group configuration pages. But for now, we are stuck with the fact that there isn't any way to refer to attachments from one customized group into another.

The improvement proposal is modify the $UploadPrefixFmt customization with something similar to that is available via $PagePathFmt, using an $UploadPrefixPathFmt array where:

  • only the 1st element would be used as the prefix when uploading.
  • all the elements would be used sequentially as a potential prefix when computing download links.

Therefore, we could define:

(local/MyRegularGroup.php)
$UploadPrefixPathFmt = array('/$Group', '/$FullName');
(local/MySpecificGroup.php)
$UploadPrefixPathFmt = array('/$FullName', '$Group');

to enable cross-group attachments to work.

Recipes that possible changes in the core would be related to

See also

  • Profiles.ThomasP "Naming scheme for paths to uploaded files"
  • PITS.00597 (a bug relating to referencing a file using full pagename)
  • PITS.00771 (a feature request concerning upload filename prefixes)