rename before upload to image hosting server

This commit is contained in:
xiaomlove
2024-12-30 00:35:02 +08:00
parent 5a9f1f1017
commit 3cf7b36ad6
2 changed files with 17 additions and 3 deletions

View File

@@ -238,7 +238,7 @@ if ($Attach->enable_attachment())
} else {
try {
$driver = \Nexus\Attachment\Storage::getDriver();
$location = $driver->uploadGetLocation($file["tmp_name"]);
$location = $driver->uploadGetLocation($file["tmp_name"], $file['name']);
$db_file_location = substr($location, 0, -1*strlen($ext)-1);
$url = $driver->getImageUrl($location);
} catch (\Exception $exception) {