Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign part request response #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions javascripts/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ function Upload(file, o, key) {

upload.signPartRequests(id, object_name, upload_id, parts, function(response) {
_.each(parts, function(part, key) {
part.date = response[key].date;
part.auth = response[key].authorization;
part.date = response.uploads[key].date;
part.auth = response.uploads[key].authorization;

// Notify handler that an xhr request has been opened
upload.handler.beginUpload(pipes, upload);
Expand Down
6 changes: 4 additions & 2 deletions spec/javascripts/UploadSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ describe("An upload", function() {
});

spyOn(s3mp, 'signPartRequests').andCallFake(function(id, object_name, upload_id, parts, callback) {
callback([{authorization:"AWS authorization code 1", date:"Thu, 24 Jan 2013 20:36:25 EST"},
{authorization:"AWS authroization code 2", date:"Thu, 24 Jan 2013 20:36:25 EST"}]);
callback({uploads: [
{authorization:"AWS authorization code 1", date:"Thu, 24 Jan 2013 20:36:25 EST"},
{authorization:"AWS authroization code 2", date:"Thu, 24 Jan 2013 20:36:25 EST"}
]});
});

spyOn(s3mp, 'sliceBlob').andCallFake(function(blob, start, end) {
Expand Down
4 changes: 2 additions & 2 deletions vendor/assets/javascripts/s3_multipart/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,8 @@ function Upload(file, o, key) {

upload.signPartRequests(id, object_name, upload_id, parts, function(response) {
_.each(parts, function(part, key) {
part.date = response[key].date;
part.auth = response[key].authorization;
part.date = response.uploads[key].date;
part.auth = response.uploads[key].authorization;

// Notify handler that an xhr request has been opened
upload.handler.beginUpload(pipes, upload);
Expand Down
2 changes: 1 addition & 1 deletion vendor/assets/javascripts/s3_multipart/lib.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.