mirror of
https://github.com/filegator/filegator.git
synced 2025-08-13 00:14:11 +02:00
File upload multibyte fix (PCRE_UTF8 flag)
This commit is contained in:
@@ -356,4 +356,43 @@ class UploadTest extends TestCase
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
public function testFileUploadWithMultibyteName()
|
||||
{
|
||||
$this->signIn('john@example.com', 'john123');
|
||||
|
||||
$files = ['file' => new UploadedFile(TEST_FILE, 'ąčęėįšųū.txt', 'text/plain', null, true)];
|
||||
|
||||
$data = [
|
||||
'resumableChunkNumber' => 1,
|
||||
'resumableChunkSize' => 1048576,
|
||||
'resumableCurrentChunkSize' => 0.5 * 1024 * 1024,
|
||||
'resumableTotalChunks' => 1,
|
||||
'resumableTotalSize' => 0.5 * 1024 * 1024,
|
||||
'resumableType' => 'text/plain',
|
||||
'resumableIdentifier' => 'CHUNKS-SIMPLE-TEST',
|
||||
'resumableFilename' => "断及服务层流.txt",
|
||||
'resumableRelativePath' => '/',
|
||||
];
|
||||
|
||||
$this->sendRequest('POST', '/upload', $data, $files);
|
||||
|
||||
$this->assertOk();
|
||||
|
||||
$this->sendRequest('POST', '/getdir', [
|
||||
'dir' => '/',
|
||||
]);
|
||||
|
||||
$this->assertResponseJsonHas([
|
||||
'data' => [
|
||||
'files' => [
|
||||
0 => [
|
||||
'type' => 'file',
|
||||
'path' => '/断及服务层流.txt',
|
||||
'name' => '断及服务层流.txt',
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user