We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3eee83 commit 45a6abcCopy full SHA for 45a6abc
src/RememberedFile.php
@@ -0,0 +1,21 @@
1
+<?php
2
+
3
+namespace Photogabble\LaravelRememberUploads;
4
5
+class RememberedFile extends \Symfony\Component\HttpFoundation\File\UploadedFile
6
+{
7
8
+ /**
9
+ * Returns whether the file was uploaded successfully.
10
+ *
11
+ * @return bool True if the file has been uploaded with HTTP and no error occurred
12
+ */
13
+ public function isValid()
14
+ {
15
+ $isOk = UPLOAD_ERR_OK === $this->error;
16
17
+ return $isOk; // @todo check that pathname is within the expected storage directory
18
+ //return $this->test ? $isOk : $isOk && is_uploaded_file($this->getPathname());
19
+ }
20
21
+}
0 commit comments