javascript - Node-Webkit - Try enumerate file under directory from webkitdirectory input but return only directory path -
the title may long, wanted enumerate file names under selected directory webkitdirectory <input>
, returned directory name.
<input id="dialog-choose-photo-folder" type="file" webkitdirectory>
console returned: > document.getelementbyid("dialog-choose-photo-folder").files filelist {0: file, length: 1, item: function, clear: function, append: function} 0: file lastmodifieddate: tue oct 07 2014 23:02:54 gmt+0800 (中國標準時間) name: "pictures" path: "c:\users\daniel\pictures" size: 40960 type: "" webkitrelativepath: "daniel/pictures" __proto__: file length: 1 __proto__: filelist
the document.getelementbyid("dialog-choose-photo-folder").files
returned length of 1
there many.
how comes returned directory name? doing wrong? followed closely https://github.com/rogerwang/node-webkit/wiki/file-dialogs
i've seen nwdirectory
attribute , believe mine behaved that, bug?
if i'm doing wrong, want result of: http://www.thecssninja.com/demo/webkitdirectory/
please help me! :(
after fighting own thoughts in head, , asking question on meta stackoverflow, have decided post answer. :) if has improve answer, take it.
according here: https://github.com/nwjs/nw.js/issues/2571
note - seems work fine in 0.8.6. - looks worked before in 0.12 alpha may have been broken when #2961 fixed
-chafey
this feature broken. should forwards update (not likely). end. :)
update:i forgot mention how overcame problem. used node.js.
javascript google-chrome node-webkit nw.js
No comments:
Post a Comment