-
Notifications
You must be signed in to change notification settings - Fork 310
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
Wrong attachment path in database - slashes #990
Labels
Comments
are you testing on windows? |
Yes, it is on windows |
Any solution? |
Try: diff --git a/FileManager/src/Utility/FileStorageUtils.php b/FileManager/src/Utility/FileStorageUtils.php
index 8c2878399..a99e74a8c 100644
--- a/FileManager/src/Utility/FileStorageUtils.php
+++ b/FileManager/src/Utility/FileStorageUtils.php
@@ -55,7 +55,7 @@ class FileStorageUtils
$path = null;
for ($i = 0; $i < $level; $i++) {
$decrement -= 2;
- $path .= sprintf("%02d" . DS, substr(str_pad('', 2 * $level, '0') . $string, $decrement, 2));
+ $path .= sprintf("%02d" . '/', substr(str_pad('', 2 * $level, '0') . $string, $decrement, 2));
}
return $path; If it works, please PR. Thanks |
Yes, it works - thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In database i have wrong slashes in attachments path:
/assets/37\53\75/b7134bcfc363edeec62b097f10629c38679044d6.resized-100x57.jpg
and when i try to use attachment in some node there is a problem with wrong path:
But when i'm checking inside media/attachments the link is generating fine:
The text was updated successfully, but these errors were encountered: