2013-09-27 35 views
0

我只允許用戶通過computer上傳文件,所以我不需要彈出窗口。將窗口或模態直接插入文件按鈕

是否有可能將filepicker window直接插入<input type="file">因此當用戶單擊choose file按鈕時。它直接打開OS文件窗口,而不是打開文件選擇器?

回答

1

可以使用filepicker.store()API出於這樣的目的 - https://developers.inkfilepicker.com/docs/web/#store

var input = document.getElementById("store-input"); 
filepicker.store(input, function(InkBlob){ 
     console.log("Store successful:", JSON.stringify(InkBlob)); 
    }, function(FPError) { 
     console.log(FPError.toString()); 
    }, function(progress) { 
     console.log("Loading: "+progress+"%"); 
    } 
); 
+0

哇,謝謝。 – vzhen

相關問題