I am trying to get the storage to work, but all the files i upload are only 23bytes in size and thus unusable. Is there something i'm doing wrong here?
if (Request::hasFile('attachments'))
{
foreach (Request::file('attachments') as $file)
{
if (substr(File::mimeType($file), 0, 5) == 'image')
{
Storage::disk('local')->put('project/'. $id .'/'. time() .'.'. $file->getClientOriginalExtension() , $file);
// Make thumbnail later on
}
else
{
Storage::disk('local')->put('project/'. $id .'/'. time() .'.'. $file->getClientOriginalExtension(), $file);
}
}
}