Skip to content

Commit 79f57d9

Browse files
authored
Merge pull request #668 from mapswipe/fix/storage-file-namespace
Add namespace for file name in the storage
2 parents d0c3a60 + 539f90e commit 79f57d9

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

manager-dashboard/README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
# base-react-app
2-
3-
Base React App
1+
# Manager Dashboard
2+
A web interface for create and manage
3+
missions, tutorials, groups for the MapSwipe.
44

55
## Development
66

77
```bash
8-
# Generate graphql files
9-
yarn generate
10-
118
# Start web app
129
yarn start
1310

@@ -18,11 +15,9 @@ yarn build
1815
yarn typecheck
1916

2017
# Eslint check
21-
yarn eslint
18+
yarn lint
2219

2320
# Check unused files
2421
yarn check-unused
2522

26-
# Run tests
27-
yarn test
2823
```

manager-dashboard/app/views/NewProject/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ function NewProject(props: Props) {
340340
}
341341

342342
const storage = getStorage();
343-
const uploadedImageRef = storageRef(storage, `projectImages/${projectImage.name}`);
343+
const timestamp = (new Date()).getTime();
344+
const uploadedImageRef = storageRef(storage, `projectImages/${timestamp}-project-image-${projectImage.name}`);
344345

345346
setProjectSubmissionStatus('imageUpload');
346347
try {

manager-dashboard/app/views/NewTutorial/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@ function NewTutorial(props: Props) {
129129
} = finalValues;
130130

131131
const storage = getStorage();
132-
const uploadedImage1Ref = storageRef(storage, `projectImages/${exampleImage1}`);
133-
const uploadedImage2Ref = storageRef(storage, `projectImages/${exampleImage2}`);
132+
const timestamp = (new Date()).getTime();
133+
const uploadedImage1Ref = storageRef(storage, `projectImages/${timestamp}-tutorial-image-1-${exampleImage1.name}`);
134+
const uploadedImage2Ref = storageRef(storage, `projectImages/${timestamp}-tutorial-image-2-${exampleImage2.name}`);
134135

135136
setTutorialSubmissionStatus('imageUpload');
136137
try {

manager-dashboard/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
},
2424
"repository": {
2525
"type": "git",
26-
"url": "git+https://github.com/mapswipe/python-mapswipe-dashboard.git"
26+
"url": "git+https://github.com/mapswipe/python-mapswipe-workers.git"
2727
},
2828
"keywords": [],
2929
"author": "",
3030
"license": "ISC",
3131
"bugs": {
32-
"url": "https://github.com/mapswipe/python-mapswipe-dashboard/issues"
32+
"url": "https://github.com/mapswipe/python-mapswipe-workers/issues"
3333
},
34-
"homepage": "https://github.com/mapswipe/python-mapswipe-dashboard#readme",
34+
"homepage": "https://github.com/mapswipe/python-mapswipe-workers#readme",
3535
"dependencies": {
3636
"@apollo/client": "^3.3.21",
3737
"@babel/runtime": "^7.11.2",

0 commit comments

Comments
 (0)