Upload files without intermediary media-tmp
This commit is contained in:
parent
c0e12ac5a7
commit
a6253f0bd5
3 changed files with 5 additions and 5 deletions
|
@ -144,11 +144,10 @@ class MicropubClientController extends Controller
|
|||
if ($request->hasFile('photo')) {
|
||||
$photos = $request->file('photo');
|
||||
foreach ($photos as $photo) {
|
||||
$filename = $photo->getClientOriginalName();
|
||||
$photo->move(storage_path() . '/media-tmp', $filename);
|
||||
$multipart[] = [
|
||||
'name' => 'photo[]',
|
||||
'contents' => fopen(storage_path() . '/media-tmp/' . $filename, 'r'),
|
||||
'contents' => fopen($photo->path(), 'r'),
|
||||
'filename' => $photo->getClientOriginalName(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue