Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
jio
Commits
c62c5971
Commit
c62c5971
authored
Sep 19, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
davstorage getAttachment doesn't return content type - fixed
parent
98a8e162
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
src/jio.storage/davstorage.js
src/jio.storage/davstorage.js
+3
-2
test/jio.storage/davstorage.livetests.js
test/jio.storage/davstorage.livetests.js
+3
-1
No files found.
src/jio.storage/davstorage.js
View file @
c62c5971
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
*/
*/
/*jslint indent: 2, maxlen: 80, nomen: true, regexp: true, unparam: true */
/*jslint indent: 2, maxlen: 80, nomen: true, regexp: true, unparam: true */
/*global define, window, jIO, promy, btoa, DOMParser */
/*global define, window, jIO, promy, btoa, DOMParser
, Blob
*/
// JIO Dav Storage Description :
// JIO Dav Storage Description :
// {
// {
...
@@ -609,6 +609,7 @@
...
@@ -609,6 +609,7 @@
}};
}};
}
}
delete
o
[
"
Not Found
"
];
delete
o
[
"
Not Found
"
];
o
.
type
=
attachment
.
content_type
||
"
application/octet-stream
"
;
o
.
notify_message
=
"
Retrieving attachment
"
;
o
.
notify_message
=
"
Retrieving attachment
"
;
o
.
percentage
=
[
30
,
100
];
o
.
percentage
=
[
30
,
100
];
o
.
digest
=
attachment
.
digest
;
o
.
digest
=
attachment
.
digest
;
...
@@ -616,7 +617,7 @@
...
@@ -616,7 +617,7 @@
}.
bind
(
this
),
}.
bind
(
this
),
success
:
function
(
e
)
{
success
:
function
(
e
)
{
command
.
success
(
e
.
target
.
status
,
{
command
.
success
(
e
.
target
.
status
,
{
"
data
"
:
e
.
target
.
response
,
"
data
"
:
new
Blob
([
e
.
target
.
response
],
{
"
type
"
:
o
.
type
})
,
"
digest
"
:
o
.
digest
"
digest
"
:
o
.
digest
});
});
},
},
...
...
test/jio.storage/davstorage.livetests.js
View file @
c62c5971
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
* X-Requested-With, X-HTTP-Method-Override, Accept, Authorization,
* X-Requested-With, X-HTTP-Method-Override, Accept, Authorization,
* Depth"
* Depth"
*/
*/
test
(
"
Scenario
"
,
29
,
function
()
{
test
(
"
Scenario
"
,
31
,
function
()
{
ok
(
!
(
/^file:/
.
test
(
location
.
href
)),
ok
(
!
(
/^file:/
.
test
(
location
.
href
)),
"
Should not work on file protocol:
"
+
location
.
href
);
"
Should not work on file protocol:
"
+
location
.
href
);
...
@@ -322,6 +322,7 @@
...
@@ -322,6 +322,7 @@
"
statusText
"
:
"
Ok
"
"
statusText
"
:
"
Ok
"
},
"
Get first attachment
"
);
},
"
Get first attachment
"
);
return
jIO
.
util
.
readBlobAsText
(
blob
).
then
(
function
(
e
)
{
return
jIO
.
util
.
readBlobAsText
(
blob
).
then
(
function
(
e
)
{
deepEqual
(
blob
.
type
,
"
text/plain
"
,
"
Check blob type
"
);
deepEqual
(
e
.
target
.
result
,
"
aab
"
,
"
Check blob text content
"
);
deepEqual
(
e
.
target
.
result
,
"
aab
"
,
"
Check blob text content
"
);
},
function
(
err
)
{
},
function
(
err
)
{
deepEqual
(
err
,
"
no error
"
,
"
Check blob text content
"
);
deepEqual
(
err
,
"
no error
"
,
"
Check blob text content
"
);
...
@@ -347,6 +348,7 @@
...
@@ -347,6 +348,7 @@
"
statusText
"
:
"
Ok
"
"
statusText
"
:
"
Ok
"
},
"
Get first attachment
"
);
},
"
Get first attachment
"
);
return
jIO
.
util
.
readBlobAsText
(
blob
).
then
(
function
(
e
)
{
return
jIO
.
util
.
readBlobAsText
(
blob
).
then
(
function
(
e
)
{
deepEqual
(
blob
.
type
,
"
text/plain
"
,
"
Check blob type
"
);
deepEqual
(
e
.
target
.
result
,
"
aba
"
,
"
Check blob text content
"
);
deepEqual
(
e
.
target
.
result
,
"
aba
"
,
"
Check blob text content
"
);
},
function
(
err
)
{
},
function
(
err
)
{
deepEqual
(
err
,
"
no error
"
,
"
Check blob text content
"
);
deepEqual
(
err
,
"
no error
"
,
"
Check blob text content
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment