Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

PUBLIC / surfer-okd

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 35355283 authored 7 years ago by Johannes Zellner's avatar Johannes Zellner
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

Support uploading whole folder trees

1 parent 09d1f4f5
Hide whitespace changes
Inline Side-by-side
Showing with 2 additions and 2 deletions
  • frontend/index.html
  • frontend/js/app.js
frontend/index.html
View file @3535528
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div id="app" @drop="drop" @dragover="dragOver"> <div id="app" @drop="drop" @dragover="dragOver">
<el-container> <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-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> <el-form :model="loginData" label-position="top" @submit.native.prevent>
......
This diff is collapsed. Click to expand it.
frontend/js/app.js
View file @3535528
...@@ -136,7 +136,7 @@ function uploadFiles(files) { ...@@ -136,7 +136,7 @@ function uploadFiles(files) {
app.uploadStatus.percentDone = 0; app.uploadStatus.percentDone = 0;
asyncForEach(files, function (file, callback) { 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(); var formData = new FormData();
formData.append('file', file); formData.append('file', file);
......
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
  • Please register or sign in to post a comment