@@ 315-323 (lines=9) @@ | ||
312 | $suggested = $this->request->getHeader('X-WOPI-SuggestedTarget'); |
|
313 | $suggested = iconv('utf-7', 'utf-8', $suggested); |
|
314 | ||
315 | if ($suggested[0] === '.') { |
|
316 | $path = dirname($file->getPath()) . '/New File' . $suggested; |
|
317 | } |
|
318 | else if ($suggested[0] !== '/') { |
|
319 | $path = dirname($file->getPath()) . '/' . $suggested; |
|
320 | } |
|
321 | else { |
|
322 | $path = $userFolder->getPath() . $suggested; |
|
323 | } |
|
324 | ||
325 | if ($path === '') { |
|
326 | return new JSONResponse([ |
|
@@ 459-467 (lines=9) @@ | ||
456 | $suggested = $this->request->getHeader('X-WOPI-SuggestedTarget'); |
|
457 | $suggested = iconv('utf-7', 'utf-8', $suggested); |
|
458 | ||
459 | if ($suggested[0] === '.') { |
|
460 | $path = dirname($file->getPath()) . '/New File' . $suggested; |
|
461 | } else if ($suggested[0] !== '/') { |
|
462 | $path = dirname($file->getPath()) . '/' . $suggested; |
|
463 | } else { |
|
464 | $path = $userFolder->getPath() . $suggested; |
|
465 | } |
|
466 | ||
467 | if ($path === '') { |
|
468 | return new JSONResponse([ |
|
469 | 'status' => 'error', |
|
470 | 'message' => 'Cannot create the file' |