3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-03-22 16:35:29 +00:00

Made logo file have a better name for multiple tries in the same day

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2020-05-27 02:31:04 -07:00
parent 42fe1ea398
commit d54acd908c

View File

@ -413,7 +413,7 @@ class SettingsController extends Controller
if ($request->hasFile('logo')) {
$image = $request->file('logo');
$ext = $image->getClientOriginalExtension();
$setting->logo = $file_name = 'logo-.'.date('Y-m-d').'.'. $ext;
$setting->logo = $file_name = 'logo-'.date('U').'.'. $ext;
if ('svg' != $image->getClientOriginalExtension()) {
$upload = Image::make($image->getRealPath())->resize(null, 150, function ($constraint) {