fix: capture all formData entries in share targets; bump sw cache to v4
This commit is contained in:
1 parent
3ed7fb8036
commit
723d40e546
3 files changed
+13
-13
No files matched your search
@@ -169,13 +169,9 @@ export async function POST(req: NextRequest) {
|
||||
).trim();
|
||||
url = ((formData.get('url') as string) || '').trim();
|
||||
|
||||
const rawFiles = [
|
||||
...formData.getAll('files'),
|
||||
...formData.getAll('file'),
|
||||
];
|
||||
for (const item of rawFiles) {
|
||||
if (item && typeof item === 'object' && 'arrayBuffer' in item) {
|
||||
const file = item as File;
|
||||
for (const [key, value] of formData.entries()) {
|
||||
if (value && typeof value === 'object' && 'arrayBuffer' in value) {
|
||||
const file = value as File;
|
||||
if (file.size > 0) {
|
||||
uploadedFiles.push(file);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user