Better handling of uploaded files. #7688

Merged
Ruk33 merged 2 commits from 7687-535-upload-form-bugs into master 2022-09-19 22:42:16 +02:00
Showing only changes of commit 5ffcd7906d - Show all commits

View file

@ -100,7 +100,9 @@ function PublishFile(props: Props) {
return; return;
} }
async function readSelectedFile() { async function readSelectedFile() {
const readFileContents = false; // Read the file to get the file's duration (if possible)
// and offer transcoding it.
const readFileContents = true;
const result = await ipcRenderer.invoke('get-file-from-path', filePath, readFileContents); const result = await ipcRenderer.invoke('get-file-from-path', filePath, readFileContents);
const file = new File([result.buffer], result.name, { const file = new File([result.buffer], result.name, {
type: result.mime, type: result.mime,