Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
lucas.parsy
jio
Commits
04a26788
Commit
04a26788
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
4da345f4
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 @
04a26788
...
@@ -220,26 +220,26 @@
...
@@ -220,26 +220,26 @@
// the document already exists
// the document already exists
// download data
// download data
jIO
.
util
.
blobAsBinaryString
(
param
.
_blob
).
then
(
function
(
data
)
{
jIO
.
util
.
readBlobAsBinaryString
(
param
.
_blob
).
then
(
function
(
e
)
{
doc
.
_attachments
=
doc
.
_attachments
||
{};
doc
.
_attachments
=
doc
.
_attachments
||
{};
doc
.
_attachments
[
param
.
_attachment
]
=
{
doc
.
_attachments
[
param
.
_attachment
]
=
{
"
content_type
"
:
param
.
_blob
.
type
,
"
content_type
"
:
param
.
_blob
.
type
,
"
digest
"
:
jIO
.
util
.
makeBinaryStringDigest
(
data
),
"
digest
"
:
jIO
.
util
.
makeBinaryStringDigest
(
e
.
target
.
result
),
"
length
"
:
param
.
_blob
.
size
"
length
"
:
param
.
_blob
.
size
};
};
that
.
_storage
.
setItem
(
that
.
_localpath
+
"
/
"
+
param
.
_id
+
"
/
"
+
that
.
_storage
.
setItem
(
that
.
_localpath
+
"
/
"
+
param
.
_id
+
"
/
"
+
param
.
_attachment
,
data
);
param
.
_attachment
,
e
.
target
.
result
);
that
.
_storage
.
setItem
(
that
.
_localpath
+
"
/
"
+
param
.
_id
,
doc
);
that
.
_storage
.
setItem
(
that
.
_localpath
+
"
/
"
+
param
.
_id
,
doc
);
command
.
success
({
"
hash
"
:
doc
.
_attachments
[
param
.
_attachment
].
digest
});
command
.
success
({
"
hash
"
:
doc
.
_attachments
[
param
.
_attachment
].
digest
});
},
function
()
{
},
function
(
e
)
{
command
.
error
(
command
.
error
(
"
request_timeout
"
,
"
request_timeout
"
,
"
blob error
"
,
"
blob error
"
,
"
Unable to download
blob content
"
"
Error
"
+
e
.
status
+
"
, unable to get
blob content
"
);
);
},
function
()
{
},
function
(
e
)
{
command
.
notify
(
50
);
// XXX get percentage
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