File tree 2 files changed +38
-0
lines changed
2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ < h1 > 360 Image Uploader</ h1 >
2
+ < form >
3
+ < input type ="file " />
4
+ </ form >
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ while getopts " :b:" opt; do
4
+ case $opt in
5
+ b)
6
+ aws s3api create-bucket --bucket $OPTARG --region eu-west-1 --create-bucket-configuration LocationConstraint=eu-west-1 --profile default
7
+ aws s3 cp index.html s3://$OPTARG /index.html --profile default
8
+ aws s3api put-bucket-policy --bucket $OPTARG --policy " {
9
+ \" Version\" : \" 2012-10-17\" ,
10
+ \" Statement\" : [
11
+ {
12
+ \" Effect\" : \" Allow\" ,
13
+ \" Principal\" : \" *\" ,
14
+ \" Action\" : \" s3:GetObject\" ,
15
+ \" Resource\" : \" arn:aws:s3:::${OPTARG} /*\"
16
+ }
17
+ ]
18
+ }" --profile default
19
+ aws s3 website s3://$OPTARG --index-document index.html --profile default
20
+ exit 0
21
+ ;;
22
+ \? )
23
+ echo " Invalid option: -$OPTARG " >&2
24
+ exit 1
25
+ ;;
26
+ :)
27
+ echo " Option -$OPTARG requires an argument." >&2
28
+ exit 1
29
+ ;;
30
+ esac
31
+ done
32
+
33
+ echo " Must provide bucket name with -b"
34
+ exit 1
You can’t perform that action at this time.
0 commit comments