user5066707
user5066707

Reputation:

How to store \Illuminate\Http\UploadedFile on the public disk?

I want to store an UploadedFile to the folder /storage/app/public. I'm using file->storePubliclyAs(), but it's storing at /storage/app. Using file->storeAs() gives the same effect.

Probably that'd be possible using Storage::disk('public')->write(url, file), though it'd be easier if I could just use a method like file->storeAs().

Upvotes: -1

Views: 1267

Answers (2)

genyAlien
genyAlien

Reputation: 1

Check your config\platform.php

'attachment'    => [
    'disk'      => env('FILESYSTEM_DISK', 'public'),
    'generator' => \Orchid\Attachment\Engines\Generator::class,
],

change disk on public

'attachment'    => [
    'disk'      => 'public',
    'generator' => \Orchid\Attachment\Engines\Generator::class,
],

or go to env and change FILESYSTEM_DISK

Upvotes: 0

Specify public folder

file->storeAs('public')

Upvotes: 0

Related Questions