Upload files without intermediary media-tmp

This commit is contained in:
Jonny Barnes 2016-10-10 16:44:41 +01:00
parent c0e12ac5a7
commit a6253f0bd5
3 changed files with 5 additions and 5 deletions

View file

@ -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(),
];
}
}

View file

@ -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

View file

@ -1,2 +0,0 @@
*
!.gitignore