Commit 82bd4819 authored by Tomáš Peterka's avatar Tomáš Peterka

Update manage_documents.rst

parent d83a1306
...@@ -199,11 +199,13 @@ The following example creates a new jIO in localStorage and then posts a documen ...@@ -199,11 +199,13 @@ The following example creates a new jIO in localStorage and then posts a documen
description : 'Images Compilation' description : 'Images Compilation'
}) })
.push(undefined, function(err) { .push(undefined, function(err) {
// pushes error handler with RSVP.Queue push method
// nothing to do with JIO itself
return alert('Error posting the document metadata'); return alert('Error posting the document metadata');
}); });
// post a thumbnail attachment // post a thumbnail attachment
jio_instance.putAttachment('metadatda', jio_instance.putAttachment('metadata',
'thumbnail', 'thumbnail',
new Blob([my_image], {type: 'image/jpeg'}) new Blob([my_image], {type: 'image/jpeg'})
).push(undefined, function(err) { ).push(undefined, function(err) {
...@@ -211,13 +213,13 @@ The following example creates a new jIO in localStorage and then posts a documen ...@@ -211,13 +213,13 @@ The following example creates a new jIO in localStorage and then posts a documen
}); });
// post video attachment // post video attachment
jio_instance.putAttachment('metadatda', jio_instance.putAttachment('metadata',
'video', 'video',
new Blob([my_video], {type: 'video/ogg'}) new Blob([my_video], {type: 'video/ogg'})
).push(undefined, function(err) { ).push(undefined, function(err) {
return alert('Error attaching video'); return alert('Error attaching video');
}); });
alert('Video Stored'); alert('Video Stored');
indexedDB Storage now contains: indexedDB Storage now contains:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment