Input type='file' webkitdir getting the path info

238 views
Skip to first unread message

CqN

unread,
Apr 12, 2011, 2:11:15 AM4/12/11
to Chromium-extensions
When using
<input type='file' webkitdir multiple>

from where can I get the file dir path the user selected (say with
respect to the app direcotry, or absolute)?

BTW, there appears to be a bug in the webkitdir api. If there are two
or more files, it seems to work as expected by filling up the dir
list, with a file count being displayed. However if there is only one
file, the file name itself displayed... This looks like a bug,
because if there is only one file, you do not get it the exepcted
list.

CqN

Arne Roomann-Kurrik

unread,
May 18, 2011, 4:07:07 PM5/18/11
to CqN, Chromium-extensions
In chrome, the File object should have a webkitRelativePath property you can reference to get the path relative to the selected directory root.  There's no way to get an absolute path.

Regarding the second issue, please file a bug at crbug.com if you think you've found a bug.  Providing a reduced test case will really help diagnose any issues.

~Arne



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Reply all
Reply to author
Forward
0 new messages