Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
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
Alexandra Rogova
jio_mebibou
Commits
28e451c7
Commit
28e451c7
authored
Aug 29, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localstorage read blob function updated + notifies download (putAttachment)
parent
b67de356
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/jio.storage/localstorage.js
src/jio.storage/localstorage.js
+7
-7
No files found.
src/jio.storage/localstorage.js
View file @
28e451c7
...
...
@@ -220,26 +220,26 @@
// the document already exists
// download data
jIO
.
util
.
blobAsBinaryString
(
param
.
_blob
).
then
(
function
(
data
)
{
jIO
.
util
.
readBlobAsBinaryString
(
param
.
_blob
).
then
(
function
(
e
)
{
doc
.
_attachments
=
doc
.
_attachments
||
{};
doc
.
_attachments
[
param
.
_attachment
]
=
{
"
content_type
"
:
param
.
_blob
.
type
,
"
digest
"
:
jIO
.
util
.
makeBinaryStringDigest
(
data
),
"
digest
"
:
jIO
.
util
.
makeBinaryStringDigest
(
e
.
target
.
result
),
"
length
"
:
param
.
_blob
.
size
};
that
.
_storage
.
setItem
(
that
.
_localpath
+
"
/
"
+
param
.
_id
+
"
/
"
+
param
.
_attachment
,
data
);
param
.
_attachment
,
e
.
target
.
result
);
that
.
_storage
.
setItem
(
that
.
_localpath
+
"
/
"
+
param
.
_id
,
doc
);
command
.
success
({
"
hash
"
:
doc
.
_attachments
[
param
.
_attachment
].
digest
});
},
function
()
{
},
function
(
e
)
{
command
.
error
(
"
request_timeout
"
,
"
blob error
"
,
"
Unable to download
blob content
"
"
Error
"
+
e
.
status
+
"
, unable to get
blob content
"
);
},
function
()
{
command
.
notify
(
50
);
// XXX get percentage
},
function
(
e
)
{
command
.
notify
(
(
e
.
loaded
/
e
.
total
)
*
100
);
});
};
...
...
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