|
@@ 387-395 (lines=9) @@
|
| 384 |
|
$suggested = $this->request->getHeader('X-WOPI-SuggestedTarget'); |
| 385 |
|
$suggested = iconv('utf-7', 'utf-8', $suggested); |
| 386 |
|
|
| 387 |
|
if ($suggested[0] === '.') { |
| 388 |
|
$path = dirname($file->getPath()) . '/New File' . $suggested; |
| 389 |
|
} |
| 390 |
|
else if ($suggested[0] !== '/') { |
| 391 |
|
$path = dirname($file->getPath()) . '/' . $suggested; |
| 392 |
|
} |
| 393 |
|
else { |
| 394 |
|
$path = $userFolder->getPath() . $suggested; |
| 395 |
|
} |
| 396 |
|
|
| 397 |
|
if ($path === '') { |
| 398 |
|
return new JSONResponse([ |
|
@@ 531-539 (lines=9) @@
|
| 528 |
|
$suggested = $this->request->getHeader('X-WOPI-SuggestedTarget'); |
| 529 |
|
$suggested = iconv('utf-7', 'utf-8', $suggested); |
| 530 |
|
|
| 531 |
|
if ($suggested[0] === '.') { |
| 532 |
|
$path = dirname($file->getPath()) . '/New File' . $suggested; |
| 533 |
|
} else if ($suggested[0] !== '/') { |
| 534 |
|
$path = dirname($file->getPath()) . '/' . $suggested; |
| 535 |
|
} else { |
| 536 |
|
$path = $userFolder->getPath() . $suggested; |
| 537 |
|
} |
| 538 |
|
|
| 539 |
|
if ($path === '') { |
| 540 |
|
return new JSONResponse([ |
| 541 |
|
'status' => 'error', |
| 542 |
|
'message' => 'Cannot create the file' |