Replies: 1 comment
-
Try this
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When I try to upload a file from a modal, I cannot access it because
$request->file('upload')
returns null.Layout modal:
Layout::modal('importModal', Layout::rows([ Upload::make('upload') ->title('Upload CSV') ->maxFiles(1) ->acceptedFiles('.csv') ->required(), ]))->title('Import CSV'),
Import method:
public function importCSV(Request $request) { $file = new File($request->file('upload')); $attachment = $file->load();
Error:
TypeError Orchid\Attachment\File::__construct(): Argument #1 ($file) must be of type Illuminate\Http\UploadedFile, null given
Beta Was this translation helpful? Give feedback.
All reactions