|
@@ 393-401 (lines=9) @@
|
| 390 |
|
$suggested = $this->request->getHeader('X-WOPI-SuggestedTarget'); |
| 391 |
|
$suggested = iconv('utf-7', 'utf-8', $suggested); |
| 392 |
|
|
| 393 |
|
if ($suggested[0] === '.') { |
| 394 |
|
$path = dirname($file->getPath()) . '/New File' . $suggested; |
| 395 |
|
} |
| 396 |
|
else if ($suggested[0] !== '/') { |
| 397 |
|
$path = dirname($file->getPath()) . '/' . $suggested; |
| 398 |
|
} |
| 399 |
|
else { |
| 400 |
|
$path = $userFolder->getPath() . $suggested; |
| 401 |
|
} |
| 402 |
|
|
| 403 |
|
if ($path === '') { |
| 404 |
|
return new JSONResponse([ |
|
@@ 537-545 (lines=9) @@
|
| 534 |
|
$suggested = $this->request->getHeader('X-WOPI-SuggestedTarget'); |
| 535 |
|
$suggested = iconv('utf-7', 'utf-8', $suggested); |
| 536 |
|
|
| 537 |
|
if ($suggested[0] === '.') { |
| 538 |
|
$path = dirname($file->getPath()) . '/New File' . $suggested; |
| 539 |
|
} else if ($suggested[0] !== '/') { |
| 540 |
|
$path = dirname($file->getPath()) . '/' . $suggested; |
| 541 |
|
} else { |
| 542 |
|
$path = $userFolder->getPath() . $suggested; |
| 543 |
|
} |
| 544 |
|
|
| 545 |
|
if ($path === '') { |
| 546 |
|
return new JSONResponse([ |
| 547 |
|
'status' => 'error', |
| 548 |
|
'message' => 'Cannot create the file' |