Remove "file" picture url style ? #359

Open
opened 2026-10-04 23:53:56 +02:00 by adam · 6 comments
Owner

$conf['picture_url_style'] = 'file'; is too much error prone and is generally badly used

I suggest to at least remove any reference to the "file" possibility in the comment in config_default.inc.php (must leave the feature for links retro-compatibility)

`$conf['picture_url_style'] = 'file';` is too much error prone and is generally badly used I suggest to at least remove any reference to the "file" possibility in the comment in `config_default.inc.php` (must leave the feature for links retro-compatibility) <!-- github-sync-id:112228584 -->
Author
Owner

I don't understand why this is "too much error prone"...

I don't understand why this is "too much error prone"... <!-- github-comment-id:149467004 -->
Author
Owner

http://piwigo.org/forum/viewtopic.php?id=26002
The same question at least every month

http://piwigo.org/forum/viewtopic.php?id=26002 The same question at least every month <!-- github-comment-id:149484290 -->
Author
Owner

"I suggest to at least remove any reference to the "file" possibility in the comment"
+1

"I suggest to at least remove any reference to the "file" possibility in the comment" +1 <!-- github-comment-id:149530567 -->
Author
Owner

Instead of completely removing the "file" available value, we could rewrite the comment like this:

picture_url_style : one of 'id' (default) or 'id-file'. 'id-file' means that the file name (without extension) will appear in the url. You can also use 'file', without the id, but beware that you will encounter navigation issues if your file names are not unique. Moreover, 'file' value will lead to one aditionnal sql query (lower speed).

Instead of completely removing the "file" available value, we could rewrite the comment like this: picture_url_style : one of 'id' (default) or 'id-file'. 'id-file' means that the file name (without extension) will appear in the url. You can also use 'file', without the id, but beware that you will encounter navigation issues if your file names are not unique. Moreover, 'file' value will lead to one aditionnal sql query (lower speed). <!-- github-comment-id:149536345 -->
Author
Owner

Hello, is it not possible to add a section to admin to check if filenames
are unique?

2015-10-20 9:46 GMT-02:00 Pierrick Le Gall notifications@github.com:

Instead of completely removing the "file" available value, we could
rewrite the comment like this:

picture_url_style : one of 'id' (default) or 'id-file'. 'id-file' means
that the file name (without extension) will appear in the url. You can also
use 'file', without the id, but beware that you will encounter navigation
issues if your file names are not unique. Moreover, 'file' value will lead
to one aditionnal sql query (lower speed).

—
Reply to this email directly or view it on GitHub
https://github.com/Piwigo/Piwigo/issues/362#issuecomment-149536345.

Hello, is it not possible to add a section to admin to check if filenames are unique? 2015-10-20 9:46 GMT-02:00 Pierrick Le Gall notifications@github.com: > Instead of completely removing the "file" available value, we could > rewrite the comment like this: > > picture_url_style : one of 'id' (default) or 'id-file'. 'id-file' means > that the file name (without extension) will appear in the url. You can also > use 'file', without the id, but beware that you will encounter navigation > issues if your file names are not unique. Moreover, 'file' value will lead > to one aditionnal sql query (lower speed). > > — > Reply to this email directly or view it on GitHub > https://github.com/Piwigo/Piwigo/issues/362#issuecomment-149536345. <!-- github-comment-id:149538766 -->
Author
Owner

@masakik on page [Administration > Photos > Batch Manager] you can already check for duplicates "by file name".

But, following this idea, we could add a check on admin.php :

if ('file' == $conf['picture_url_style'])
{
// warn for duplicates
}

@masakik on page [Administration > Photos > Batch Manager] you can already check for duplicates "by file name". But, following this idea, we could add a check on admin.php : if ('file' == $conf['picture_url_style']) { // warn for duplicates } <!-- github-comment-id:149552117 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#359