Closed pcav closed 6 years ago
Agreed, it would be good to replicate it for all. I didn't do it because I did not know whather this was acceptable for you, or if there is a better solution. Possibly also .Pdf etc could be added. Thanks.
I'm not a big fan of duplicating extension. It is against the DRY principle (Don't Repeat Yourself).
Lowercase extension is not enough?
There is some tools to batch-rename files.
What do you think?
It makes sense to me. On the other hand, it might be disturbing to the user, especially if there are frequent new uploads to the folder. Decision is yours :)
Decision is not mine, I'm not omnipotent.
We will close this pull request, for sure as it only concernes pdf
extension.
But it is a good place to discuss about duplicating all .ext
to .EXT
or none.
Go and give your opinion!
Thanks. As said, I have no strong opinion (otherwise I'd have defended it as usual ;) ).
Thanks for your (not strong) opinion.
I would also like to have the opinion of other users.
Yeah, I’d say it’s too repetitive. The .htaccess
file would get very messy very quickly, making it difficult to maintain.
Definitely too repetitive. I tend to use a server command for that kind of grunt work - such as rename 's/\.PDF$/\.pdf/' *.PDF
to rename all extensions with .PDF to .pdf in a specific directory.
Ok. Then should we close this @oupala ? Maybe we could add something to the README about this?
I was looking at apache documentation, and I think that we could maybe try to use AddIconByType
instead of AddIcon
.
AddIconByType might be the solution as file.pdf
and FILE.PDF
should have the same mime type.
Hence this could solve the issue, choosing the icon depending on the mime type instead of the file extension.
It seems the way to go. Thanks.
Can you test it and tell us if it works?
If it does, we might change all the AddIcon
to AddIconByType
.
Will do ASAP
I confirm,
AddIconByType (PDF,theme/icons/pdf.png) *
works.
Ok, I will close this pull request and start a new one trying to replace all the AddIcon
directive to AddIconByType
.
Thanks for helping.
Oh, I didn't know apache was case sensitive. In this case, should we do that for all the file extensions? Or at least some additional common ones like
.ISO
and.PNG
?