@@ -82,7 +82,9 @@ public function validate($closure = null)
8282 $ this ->proceedToValidate ();
8383
8484 if (!$ this ->success ){
85- $ this ->callback ($ closure );
85+ if (in_array ($ this ->getStatus (), [401 , 402 , 403 , 404 , 405 ])){
86+ $ this ->callback ($ closure );
87+ }
8688 }
8789
8890 return $ this ;
@@ -259,7 +261,7 @@ public function folder($folder)
259261 * Set Structure Creation
260262 *
261263 * @param string $structure
262- * - Keys [default, year, month, day]
264+ * - [default, year, month, day]
263265 *
264266 * @return $this
265267 */
@@ -274,7 +276,7 @@ public function structure($structure)
274276 * Upload size in mb
275277 *
276278 * @param int|string $size
277- * [optional] Default is (2mb)
279+ * - [optional] Default is (2mb)
278280 *
279281 * @return $this
280282 */
@@ -306,8 +308,8 @@ public function limit($limit)
306308 * Set width
307309 *
308310 * @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
311313 *
312314 * @return $this
313315 */
@@ -325,8 +327,8 @@ public function width($width, ?bool $actual = true)
325327 * Set Height
326328 *
327329 * @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
330332 *
331333 * @return $this
332334 */
@@ -344,8 +346,7 @@ public function height($height, ?bool $actual = true)
344346 * Set Mime Type
345347 *
346348 * @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]
349350 *
350351 * @return $this
351352 */
@@ -474,18 +475,18 @@ public function form()
474475 /**
475476 * Unlink File from Server
476477 *
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
480484 *
481485 * @return void
482486 */
483- static public function unlink (string $ fileToUnlink , $ checkFile = null )
487+ static public function unlink (string $ pathToFile , $ fileName = null )
484488 {
485- Tame::unlinkFile (
486- base_path ($ fileToUnlink ),
487- $ checkFile
488- );
489+ Tame::unlink ($ pathToFile , $ fileName );
489490 }
490491
491492 /**
0 commit comments