This commit is contained in:
Eddie Wang 2019-12-03 17:06:58 -05:00
parent f2a88b959a
commit 1571ab4677
No known key found for this signature in database
GPG Key ID: DBFB3E83121BEDD1
1 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,8 @@ function MyDropzone() {
const onDrop = useCallback(acceptedFiles => { const onDrop = useCallback(acceptedFiles => {
const file = R.head(acceptedFiles) const file = R.head(acceptedFiles)
const fd = new FormData() const fd = new FormData()
const fileName = R.compose(splitFilename, pName(file as any)) const fileName = R.compose(splitFilename, pName)(file)
console.log("filename", fileName)
fd.append("file", file) fd.append("file", file)
if (window) { if (window) {
const streamSaver = require("streamsaver") const streamSaver = require("streamsaver")