...
This commit is contained in:
parent
e225e05c52
commit
6fc408cd97
8 changed files with 11 additions and 3 deletions
|
|
@ -4,9 +4,9 @@ $imageName = $imageFile->getName();
|
||||||
|
|
||||||
$tempArray = explode(".", $imageName);
|
$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 = [
|
$response = [
|
||||||
"status" => false,
|
"status" => false,
|
||||||
"message" => "Image successfully uploaded",
|
"message" => "Image successfully uploaded",
|
||||||
|
|
|
||||||
|
|
@ -10,5 +10,5 @@ Application for storing unique Image Name
|
||||||
```php
|
```php
|
||||||
$tempArray = explode(".", $imageName);
|
$tempArray = explode(".", $imageName);
|
||||||
|
|
||||||
$newImageName = round(microtime(true)) . "" . end($tempArray);
|
$newImageName = round(microtime(true)) . "." . end($tempArray);
|
||||||
```
|
```
|
||||||
BIN
MyObsidianVault/Pasted image 20241118085649.png
Normal file
BIN
MyObsidianVault/Pasted image 20241118085649.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 198 KiB |
BIN
MyObsidianVault/Pasted image 20241118085807.png
Normal file
BIN
MyObsidianVault/Pasted image 20241118085807.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 138 KiB |
BIN
MyObsidianVault/Pasted image 20241118085927.png
Normal file
BIN
MyObsidianVault/Pasted image 20241118085927.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
BIN
MyObsidianVault/Pasted image 20241118090014.png
Normal file
BIN
MyObsidianVault/Pasted image 20241118090014.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 132 KiB |
BIN
MyObsidianVault/Pasted image 20241118090047.png
Normal file
BIN
MyObsidianVault/Pasted image 20241118090047.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
|
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
![[Pasted image 20241118085649.png]]
|
||||||
|
|
||||||
|
**![[Pasted image 20241118090014.png]]
|
||||||
|
|
||||||
|
![[Pasted image 20241118090047.png]]
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue