Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storage:fs Attachments on the filesystem #207

Open
bkjproductions opened this issue Jun 3, 2021 · 1 comment
Open

storage:fs Attachments on the filesystem #207

bkjproductions opened this issue Jun 3, 2021 · 1 comment

Comments

@bkjproductions
Copy link

If you happen to back up your Attachments folder to a Windows computer, the names for the folders are both upper and lower case. That is, this plugin creates subfolders a-z and A-Z, both upper and lowercase folder names, based on the file names created by the storage system. So when you go to copy your Attachments to a Windows computer, the lowercase "a" folder is merged with the uppercase "A" folder.

I tried to fix this by addding strtoupper() around line 69 of storage.php:
$prefix = strtoupper($prefix);
but that generates an error somewhere else when the file is saved (though it is saved into an uppercase-named folder).

As a workaround I am attempting to modify include/class/misc.php around line 19 to give it only uppercase letters:

	function randCode($len=8, $chars=false) {
       // was $chars = $chars ?: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_=';
        $chars = $chars ?: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890_=';

but I don't think that really works.

It would also be great if the files were not named randomly and could keep their extensions, though that is probably a security feature?

@vollkommenIrrelevant
Copy link

Can please somebody have a look at this? This bug should be fixed!
More Information here: #212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants