Release 2.3.0
A share can now hold a private text (a password, a key, a short note) with its files or on its own. The upload page's new "Private text" card takes up to 100 KB; the browser encrypts the text and sends it through the same chunk pipeline as a file, flagged is_text on share_files, so it gets the share's password, expiry, download limit and cleanup. The recipient sees the text only after pressing "Show text", which counts as their download, so a messenger link preview cannot use up a share limited to one download. The text is left out of the file list, the ZIP and the file counts; the admin dashboard marks shares that hold one with "Text". The website gains a Private text feature card and a fifth phone screenshot; every screenshot is retaken. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
202813a1e6
commit
f9a7839ad3
@@ -25,6 +25,7 @@ class ShareFileFactory extends Factory
|
||||
'stored_path' => 'shares/'.fake()->uuid().'.enc',
|
||||
'file_size' => fake()->numberBetween(1024, 10485760),
|
||||
'mime_type' => 'text/plain',
|
||||
'is_text' => false,
|
||||
'uploaded_chunks' => 1,
|
||||
'completed_at' => now(),
|
||||
];
|
||||
@@ -41,4 +42,17 @@ class ShareFileFactory extends Factory
|
||||
'completed_at' => null,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* A share's private text.
|
||||
*/
|
||||
public function text(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'original_name' => 'text.txt',
|
||||
'relative_path' => null,
|
||||
'file_size' => fake()->numberBetween(1, 1024),
|
||||
'is_text' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user