@@ -82,7 +82,9 @@ public function validate($closure = null)
82
82
$ this ->proceedToValidate ();
83
83
84
84
if (!$ this ->success ){
85
- $ this ->callback ($ closure );
85
+ if (in_array ($ this ->getStatus (), [401 , 402 , 403 , 404 , 405 ])){
86
+ $ this ->callback ($ closure );
87
+ }
86
88
}
87
89
88
90
return $ this ;
@@ -259,7 +261,7 @@ public function folder($folder)
259
261
* Set Structure Creation
260
262
*
261
263
* @param string $structure
262
- * - Keys [default, year, month, day]
264
+ * - [default, year, month, day]
263
265
*
264
266
* @return $this
265
267
*/
@@ -274,7 +276,7 @@ public function structure($structure)
274
276
* Upload size in mb
275
277
*
276
278
* @param int|string $size
277
- * [optional] Default is (2mb)
279
+ * - [optional] Default is (2mb)
278
280
*
279
281
* @return $this
280
282
*/
@@ -306,8 +308,8 @@ public function limit($limit)
306
308
* Set width
307
309
*
308
310
* @param int|string $width
309
- * @param bool $width - Default is `true`
310
- * [optional] Set to false will make size equal to or greather than
311
+ * @param bool $actual
312
+ * - [optional] Set to false will make size equal to or greather than
311
313
*
312
314
* @return $this
313
315
*/
@@ -325,8 +327,8 @@ public function width($width, ?bool $actual = true)
325
327
* Set Height
326
328
*
327
329
* @param int|string $height
328
- * @param bool $width - Default is `true`
329
- * [optional] Set to false will make size equal to or greather than
330
+ * @param bool $actual
331
+ * - [optional] Set to false will make size equal to or greather than
330
332
*
331
333
* @return $this
332
334
*/
@@ -344,8 +346,7 @@ public function height($height, ?bool $actual = true)
344
346
* Set Mime Type
345
347
*
346
348
* @param string $mime
347
- * [available keys]
348
- * - video|audio|file|image|general_image|general_media|general_file
349
+ * - [video|audio|file|image|general_image|general_media|general_file]
349
350
*
350
351
* @return $this
351
352
*/
@@ -474,18 +475,18 @@ public function form()
474
475
/**
475
476
* Unlink File from Server
476
477
*
477
- * @param string $fileToUnlink
478
- * @param string|null $checkFile
479
- * [optional] File to check against before unlinking
478
+ * @param string $pathToFile
479
+ * - [base path will be automatically added]
480
+ *
481
+ * @param string|null $fileName
482
+ * - [optional] file name. <avatar.png>
483
+ * - File to check against before unlinking
480
484
*
481
485
* @return void
482
486
*/
483
- static public function unlink (string $ fileToUnlink , $ checkFile = null )
487
+ static public function unlink (string $ pathToFile , $ fileName = null )
484
488
{
485
- Tame::unlinkFile (
486
- base_path ($ fileToUnlink ),
487
- $ checkFile
488
- );
489
+ Tame::unlink ($ pathToFile , $ fileName );
489
490
}
490
491
491
492
/**
0 commit comments