Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
936a0896
Commit
936a0896
authored
Jan 10, 2012
by
David Dollar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support mime types for uploads
parent
29fa148f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
s3
support/aws/s3
+5
-1
No files found.
support/aws/s3
View file @
936a0896
...
@@ -138,6 +138,9 @@ s3_curl() {
...
@@ -138,6 +138,9 @@ s3_curl() {
arg
=
"-T"
inout
=
"
${
4
}
"
arg
=
"-T"
inout
=
"
${
4
}
"
headers[
${#
headers
[@]
}
]=
"x-amz-acl: public-read"
headers[
${#
headers
[@]
}
]=
"x-amz-acl: public-read"
headers[
${#
headers
[@]
}
]=
"Expect: 100-continue"
headers[
${#
headers
[@]
}
]=
"Expect: 100-continue"
if
[
"
$mime
"
!=
""
]
;
then
headers[
${#
headers
[@]
}
]=
"Content-Type:
$mime
"
fi
else
else
die
"Cannot write non-existing file
${
4
}
"
die
"Cannot write non-existing file
${
4
}
"
fi
fi
...
@@ -162,7 +165,8 @@ s3_put() {
...
@@ -162,7 +165,8 @@ s3_put() {
# $1 = remote bucket to put it into
# $1 = remote bucket to put it into
# $2 = remote name to put
# $2 = remote name to put
# $3 = file to put. This must be present if $2 is.
# $3 = file to put. This must be present if $2 is.
s3_curl PUT
"
${
1
}
"
"
${
2
}
"
"
${
3
:-${
2
}}
"
# $4 = mime type
s3_curl PUT
"
${
1
}
"
"
${
2
}
"
"
${
3
:-${
2
}}
"
"
${
4
}
"
return
$?
return
$?
}
}
...
...
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