Closed golf-x closed 4 years ago
import React, { useEffect } from "react"; import * as filestack from "filestack-js"; function App() { useEffect(() => { const fileStackApiKey = ""; const client = filestack.init(fileStackApiKey); const picker = client.picker({ accept: [ ".jpg", ".jpeg", ".png", ".gif", ".tif", ".tiff", ".webm", ".mpg", ".mp2", ".mpeg", ".mpe", ".mpv", ".mp4", ".m4p", ".m4v", ".avi", ".mov", ".wmv", ".qt", ".txt", ".pdf", ".ods", ".xlsx", ".xls", ".xlsm", ".doc", ".docx", ".odt", ".rtf", ".wpd", ".ppt", ".pptx", ".pages", ".numbers", ".key", ".xml", ".xlsb", ], onUploadDone: (files) => { console.log("files ===", files); }, }); picker.open(); }, []); return ( <div> <div id="droppane"></div> </div> ); } export default App;
it would cause error Cannot read property 'length' of undefined
it would cause error Cannot read property 'length' of undefined