Skip to content

Commit

Permalink
Updated S3 file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
strelok2012 committed Oct 2, 2019
1 parent 990ac67 commit 51c0e07
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ services:
AWS_COGNITO_POOL: ${AWS_COGNITO_POOL}
AWS_FOLDER: ${AWS_FOLDER}
GECKO_APP_HOST: ${GECKO_APP_HOST}
GECKO_APP_CONTAINER_PORT: ${GECKO_APP_CONTAINER_PORT}
networks:
- gecko
ports:
Expand Down
2 changes: 1 addition & 1 deletion gecko-upload-server/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (isAwsEnabled) {
let uploadFile = false
const s3 = new AWS.S3({apiVersion: '2006-03-01'});
uploadFile = (fileName, file, successCallback, failCallback) => {
const Key = process.env.AWS_FOLDER ? `${process.env.AWS_FOLDER}//${fileName}` : fileName
const Key = process.env.AWS_FOLDER ? `${process.env.AWS_FOLDER}/${fileName}` : fileName
s3.upload({
Key,
Body: file,
Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ module.exports = {
contentBase: 'build/', // Relative directory for base of server
publicPath: '/', // Live-reload
inline: true,
port: process.env.GECKO_APP_CONTAINER_PORT || 4000, // Port Number
host: process.env.GECKO_APP_HOST || 'localhost', // Change to '0.0.0.0' for external facing server
port: 4000, // Port Number
host: 'localhost', // Change to '0.0.0.0' for external facing server
historyApiFallback: true,
disableHostCheck: true
},
Expand Down

0 comments on commit 51c0e07

Please sign in to comment.