Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
5b2f3c7f
Commit
5b2f3c7f
authored
12 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
fix blocking drag & drop upload of folders
parent
c099545b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/files/js/files.js
+2
-2
2 additions, 2 deletions
apps/files/js/files.js
with
2 additions
and
2 deletions
apps/files/js/files.js
+
2
−
2
View file @
5b2f3c7f
...
...
@@ -209,7 +209,7 @@ $(document).ready(function() {
var
totalSize
=
0
;
if
(
files
){
for
(
var
i
=
0
;
i
<
files
.
length
;
i
++
){
if
(
files
[
i
].
size
==
0
&&
files
[
i
].
type
==
''
)
if
(
files
[
i
].
size
==
0
||
files
[
i
].
type
==
''
)
{
OC
.
dialogs
.
alert
(
t
(
'
files
'
,
'
Unable to upload your file as it is a directory or has 0 bytes
'
),
t
(
'
files
'
,
'
Upload Error
'
));
return
;
...
...
@@ -282,7 +282,7 @@ $(document).ready(function() {
var
fileName
=
files
[
i
].
name
var
dropTarget
=
$
(
e
.
originalEvent
.
target
).
closest
(
'
tr
'
);
if
(
dropTarget
&&
dropTarget
.
attr
(
'
data-type
'
)
===
'
dir
'
)
{
// drag&drop upload to folder
var
dirName
=
dropTarget
.
attr
(
'
data-file
'
)
var
dirName
=
dropTarget
.
attr
(
'
data-file
'
)
;
var
jqXHR
=
$
(
'
.file_upload_start
'
).
fileupload
(
'
send
'
,
{
files
:
files
[
i
],
formData
:
function
(
form
)
{
var
formArray
=
form
.
serializeArray
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment