This commit is contained in:
Torsten 2024-11-18 09:03:43 +01:00
parent e225e05c52
commit 6fc408cd97
8 changed files with 11 additions and 3 deletions

View file

@ -4,9 +4,9 @@ $imageName = $imageFile->getName();
$tempArray = explode(".", $imageName);
$newImageName = round(microtime(true)) . "" . end($tempArray);
$newImageName = round(microtime(true)) . "." . end($tempArray);
if($imageFile->move("images/" . $newImageName)) { // move automatically creates images folder if not exists
if($imageFile->move("images" . $newImageName)) { // move automatically creates images folder if not exists
$response = [
"status" => false,
"message" => "Image successfully uploaded",

View file

@ -10,5 +10,5 @@ Application for storing unique Image Name
```php
$tempArray = explode(".", $imageName);
$newImageName = round(microtime(true)) . "" . end($tempArray);
$newImageName = round(microtime(true)) . "." . end($tempArray);
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -0,0 +1,8 @@
![[Pasted image 20241118085649.png]]
**![[Pasted image 20241118090014.png]]
![[Pasted image 20241118090047.png]]