Skip to content

Commit 47b7ccc

Browse files
committed
use uppy.setFileMeta for title and uppy.setFileState for preview and size
1 parent fb7166f commit 47b7ccc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/gooeyFileInput.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,11 @@ async function loadPreview({
272272
preview = contentType?.startsWith("image/") ? url : preview ? preview : image;
273273

274274
if (!uppy.getFile(fileId)) return;
275+
uppy.setFileMeta(fileId, {
276+
name: title || filename,
277+
});
278+
275279
uppy.setFileState(fileId, {
276-
name: title || filename || urlToFilename(url),
277280
size: contentLength ? parseInt(contentLength) : undefined,
278281
preview: preview,
279282
});

0 commit comments

Comments
 (0)