Instead only the image path is altered.
Also fixed image manger mode not changing on button press.
$secureUploads = setting('app-secure-images');
$imageName = str_replace(' ', '-', $imageName);
$secureUploads = setting('app-secure-images');
$imageName = str_replace(' ', '-', $imageName);
- if ($secureUploads) {
- $imageName = str_random(16) . '-' . $imageName;
- }
-
$imagePath = '/uploads/images/' . $type . '/' . Date('Y-m-M') . '/';
while ($storage->exists($imagePath . $imageName)) {
$imageName = str_random(3) . $imageName;
}
$imagePath = '/uploads/images/' . $type . '/' . Date('Y-m-M') . '/';
while ($storage->exists($imagePath . $imageName)) {
$imageName = str_random(3) . $imageName;
}
$fullPath = $imagePath . $imageName;
$fullPath = $imagePath . $imageName;
+ if ($secureUploads) {
+ $fullPath = $imagePath . str_random(16) . '-' . $imageName;
+ }
try {
$storage->put($fullPath, $imageData);
try {
$storage->put($fullPath, $imageData);
html += `<img src="${image.thumbs.display}" alt="${image.name}">`;
html += '</a>';
editor.execCommand('mceInsertContent', false, html);
html += `<img src="${image.thumbs.display}" alt="${image.name}">`;
html += '</a>';
editor.execCommand('mceInsertContent', false, html);