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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
# Changelog
|
||||
|
||||
## Version {next}
|
||||
- Allow files uploaded to the client to be sent to the endoint without needing to use `media-tmp`
|
||||
|
||||
## Version 0.0.14 (2016-10-07)
|
||||
- Fix image upload for notes
|
||||
- Allow co-ordinates to be sent by the client as a geo: URI
|
||||
|
|
2
storage/media-tmp/.gitignore
vendored
2
storage/media-tmp/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
*
|
||||
!.gitignore
|
Loading…
Add table
Reference in a new issue