Commit 35355283 by Johannes Zellner

Support uploading whole folder trees

1 parent 09d1f4f5
Showing with 2 additions and 2 deletions
......@@ -21,7 +21,7 @@
<div id="app" @drop="drop" @dragover="dragOver">
<el-container>
<input type="file" ref="upload" style="display: none" id="uploadInput" multiple/>
<input type="file" ref="upload" style="display: none" id="uploadInput" multiple webkitdirectory="" directory=""/>
<el-dialog title="Login" :visible.sync="ready && !session.valid" width="30%" :close-on-press-escape="false" :show-close="false">
<el-form :model="loginData" label-position="top" @submit.native.prevent>
......
......@@ -136,7 +136,7 @@ function uploadFiles(files) {
app.uploadStatus.percentDone = 0;
asyncForEach(files, function (file, callback) {
var path = encode(sanitize(app.path + '/' + file.name));
var path = encode(sanitize(app.path + '/' + (file.webkitRelativePath || file.name)));
var formData = new FormData();
formData.append('file', file);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!