Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CedricJean committed May 14, 2020
1 parent ac591b2 commit fc21c13
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/components/ImportFromS3Dialog/get-images-from-aws.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import RecognizeFileExtension from "../../utils/RecognizeFileExtension"
import Amplify, { Storage } from "aws-amplify"
import isEmpty from "../../utils/isEmpty"

async function setUrl(result, configImport) {
if (configImport.loadProjectIsSelected) {
Expand Down Expand Up @@ -65,7 +66,8 @@ export default async (result, folderToFetch, configImport, authConfig) => {
level: "private",
})
.then(async (result) => {
samples.push(await setUrl(result, configImport))
var url = await setUrl(result, configImport)
if (!isEmpty(url)) samples.push(url)
})
.catch((err) => {
console.log("error getting link for s3 image", err)
Expand Down
12 changes: 6 additions & 6 deletions src/components/LocalStorageApp/invalidconfig.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
export default {
Auth: {
// REQUIRED only for Federated Authentication - Amazon Cognito Identity Pool ID
identityPoolId: "invalid",
identityPoolId: "ca-central-1:9f5cffa2-bbc9-4ecc-97c5-a9eced7229a9",

// REQUIRED - Amazon Cognito Region
region: "invalid",
region: "ca-central-1",

// OPTIONAL - Amazon Cognito User Pool ID
userPoolId: "invalid",
userPoolId: "ca-central-1_TaMMvWe7H",

// OPTIONAL - Amazon Cognito Web Client ID (26-char alphanumeric string)
userPoolWebClientId: "invalid",
userPoolWebClientId: "39cd95g9nmd7vfneiden3qejio",

// OPTIONAL - Enforce user authentication prior to accessing AWS resources or not
mandatorySignIn: true,
Expand All @@ -22,8 +22,8 @@ export default {
},
Storage: {
AWSS3: {
bucket: "invalid", //Your bucket name;
region: "invalid", //Specify the region your bucket was created in;
bucket: "annotation-tool-storage", //Your bucket name;
region: "ca-central-1", //Specify the region your bucket was created in;
},
},
}

0 comments on commit fc21c13

Please sign in to comment.