| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function getSharedData(): array |
||
| 48 | { |
||
| 49 | $data = $this->request->getJsonBody(); |
||
| 50 | |||
| 51 | $path = \bin2hex(\random_bytes(static::FILENAMESYSTEM_NAME_LENGTH)); |
||
| 52 | $content = base64_decode($data['data'], true); |
||
| 53 | |||
| 54 | $this->filesystem->write($path, $content); |
||
| 55 | |||
| 56 | $data['filesystem_name'] = $path; |
||
| 57 | $data['public_name'] = $data['name']; |
||
| 58 | |||
| 59 | return $data; |
||
| 60 | } |
||
| 62 |