Commit a985b095 authored by slashrsm's avatar slashrsm
Browse files

Merge pull request #12 from primsi/2555397_incorrect_temp_path_osx

Issue #2555397 by Primsi: Uploads on osx fail with input stream relat…
parents 225daed6 657324a0
......@@ -205,7 +205,7 @@ class UploadController extends ControllerBase {
}
// Read binary input stream.
$input_uri = "{$this->temporaryUploadLocation}/{$file->getFilename()}";
$input_uri = $file->getFileInfo()->getRealPath();
if (!($in = fopen($input_uri, 'rb'))) {
throw new UploadException(UploadException::INPUT_ERROR);
}
......
......@@ -122,7 +122,8 @@ class DropzoneJs extends FormElement {
if (!empty($user_input['uploaded_files'])) {
$file_names = array_filter(explode(';', $user_input['uploaded_files']));
$temp_path = \Drupal::config('system.file')->get('path.temporary');
$tmp_override = \Drupal::config('dropzonejs.settings')->get('tmp_dir');
$temp_path = ($tmp_override) ? $tmp_override : \Drupal::config('system.file')->get('path.temporary');
foreach ($file_names as $name) {
// The upload handler appended the txt extension to the file for
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment