Skip to content

Commit e2864c0

Browse files
committed
Form file field add hidePreview method
1 parent 82a9db5 commit e2864c0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Form/Field/File.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,18 @@ protected function preview()
144144
return $this->objectUrl($this->value);
145145
}
146146

147+
/**
148+
* Hides the file preview.
149+
*
150+
* @return $this
151+
*/
152+
public function hidePreview()
153+
{
154+
return $this->options([
155+
'showPreview' => false
156+
]);
157+
}
158+
147159
/**
148160
* Initialize the caption.
149161
*

0 commit comments

Comments
 (0)