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
15ee9b70
Commit
15ee9b70
authored
May 06, 2013
by
Jonathan Rivalan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finition des corrections jslint
parent
2b25d074
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
28 deletions
+33
-28
src/jio.storage/s3storage.js
src/jio.storage/s3storage.js
+33
-28
No files found.
src/jio.storage/s3storage.js
View file @
15ee9b70
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
/*global XHRwrapper: true */
/*global XHRwrapper: true */
/*global FormData: true */
/*global FormData: true */
/*global $: true */
/*global $: true */
/*jslint vars: true */
/*jslint vars: true */
/**
/**
* JIO S3 Storage. Type = "s3".
* JIO S3 Storage. Type = "s3".
* Amazon S3 "database" storage.
* Amazon S3 "database" storage.
...
@@ -760,24 +760,27 @@ jIO.addStorageType("s3", function (spec, my) {
...
@@ -760,24 +760,27 @@ jIO.addStorageType("s3", function (spec, my) {
);
);
}
}
function
myCallback
(
response
)
{
}
that
.
XHRwrapper
(
command
,
docId
,
''
,
'
GET
'
,
mime
,
''
,
false
,
false
,
that
.
XHRwrapper
(
command
,
docId
,
''
,
'
GET
'
,
mime
,
''
,
false
,
false
,
function
(
response
)
{
function
(
response
)
{
console
.
log
(
response
);
console
.
log
(
response
);
var
attachKeys
=
(
JSON
.
parse
(
response
)).
_attachments
;
var
attachKeys
=
(
JSON
.
parse
(
response
)).
_attachments
;
var
keys
;
var
keys
;
for
(
keys
in
attachKeys
)
{
for
(
keys
in
attachKeys
)
{
that
.
XHRwrapper
(
command
,
if
(
attachKeys
.
hasOwnProperty
(
keys
))
{
docI
d
,
that
.
XHRwrapper
(
comman
d
,
keys
,
docId
,
'
DELETE
'
,
keys
,
mime
,
'
DELETE
'
,
''
,
mime
,
false
,
''
,
false
,
false
,
function
(
response
)
{
false
,
//console.log('this key got deleted : ' + keys);
myCallback
}
);
);
}
}
}
deleteDocument
();
deleteDocument
();
}
}
...
@@ -878,10 +881,24 @@ jIO.addStorageType("s3", function (spec, my) {
...
@@ -878,10 +881,24 @@ jIO.addStorageType("s3", function (spec, my) {
};
};
};
};
var
errCallback
=
function
(
err
)
{
if
(
err
.
status
===
404
)
{
//status
//statustext "Not Found"
//error
//reason "reason"
//message "did not work"
err
.
error
=
"
not_found
"
;
that
.
error
(
err
);
}
else
{
return
that
.
retry
(
err
);
}
};
var
i
=
resultTable
.
length
-
1
;
var
i
=
resultTable
.
length
-
1
;
var
keyId
;
var
keyId
;
if
(
command
.
getOption
(
"
include_docs
"
)
===
true
)
{
if
(
command
.
getOption
(
"
include_docs
"
)
===
true
)
{
for
(
i
;
i
>=
0
;
i
--
)
{
for
(
i
;
i
>=
0
;
i
-=
1
)
{
keyId
=
resultTable
[
i
];
keyId
=
resultTable
[
i
];
var
Signature
=
that
.
encodeAuthorization
(
keyId
);
var
Signature
=
that
.
encodeAuthorization
(
keyId
);
var
callURL
=
priv
.
url
+
keyId
;
var
callURL
=
priv
.
url
+
keyId
;
...
@@ -914,24 +931,12 @@ jIO.addStorageType("s3", function (spec, my) {
...
@@ -914,24 +931,12 @@ jIO.addStorageType("s3", function (spec, my) {
//'x-amz-security-token' : ,
//'x-amz-security-token' : ,
},
},
success
:
dealCallback
(
i
,
countB
,
allDocResponse
),
success
:
dealCallback
(
i
,
countB
,
allDocResponse
),
error
:
function
(
err
)
{
error
:
errCallback
(
this
)
if
(
err
.
status
===
404
)
{
//status
//statustext "Not Found"
//error
//reason "reason"
//message "did not work"
err
.
error
=
"
not_found
"
;
that
.
error
(
err
);
}
else
{
return
that
.
retry
(
err
);
}
}
});
});
countB
+=
1
;
countB
+=
1
;
}
}
}
else
{
}
else
{
for
(
i
;
i
>=
0
;
i
--
)
{
for
(
i
;
i
>=
0
;
i
-=
1
)
{
keyId
=
resultTable
[
i
];
keyId
=
resultTable
[
i
];
allDocResponse
.
rows
[
i
]
=
{
allDocResponse
.
rows
[
i
]
=
{
"
id
"
:
priv
.
fileNameToIds
(
keyId
).
join
(),
"
id
"
:
priv
.
fileNameToIds
(
keyId
).
join
(),
...
...
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