Skip to content

Commit 539f90e

Browse files
committed
Add namespace for file name in the storage
- Update README - Update package.json
1 parent d983fbf commit 539f90e

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
@@ -339,7 +339,8 @@ function NewProject(props: Props) {
339339
}
340340

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

344345
setProjectSubmissionStatus('imageUpload');
345346
try {

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

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

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

134135
setTutorialSubmissionStatus('imageUpload');
135136
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)