uploading a "temp" logo to the server via the Uppy uploader. Before this PR, the logo was uploaded to a "temp" folder in a S3 bucket
confirming the temp logo once the project is created / updated
the logo is copied to the storage (a S3 bucket)
This PR simplifies the process by saving the logo in the /tmp folder of the server machine and is suppposed to rely in whatever auto clean up config is setup in the server. The rest of the steps are unchanged
How to test?
You will need to re-run ./up.sh and follow the instructions in https://github.com/gigascience/gigadb-website/pull/2070 to setup the storage to work local dev. Then, if you follow the same instructions to test in the mentioned PR, nothing should change from a frontend perspective.
Also, the playwright tests should pass when you run:
cd playwright
npm install
npm run test:single admin-project-logo-upload.spec.js
How have functionalities been implemented?
the idea is to expose the /tmp folder of the server to the application (server) container so a volume - /tmp:/var/www/datasetfiles was added. The same volume exists in the web (frontend) container and this is necessary because the frontend needs to be able to access and display the temp logos
the deleteTempLogo method was removed since we rely on the /tmp autoremoval config on the server
added a writeTmpLogoFromFile to write the temp logo uplloaded by the uppy loader to the /tmp folder
updated the writeLogoFromUrl function to take into accoiunt that the incoming file is in the server >> I might need to review this
Pull request for issue: #376
IMPORTANT: this PR depends on this other PR: https://github.com/gigascience/gigadb-website/pull/2070 , which should be merged first
This is a pull request for the following functionalities:
The logo upload process involves:
This PR simplifies the process by saving the logo in the /tmp folder of the server machine and is suppposed to rely in whatever auto clean up config is setup in the server. The rest of the steps are unchanged
How to test?
You will need to re-run
./up.sh
and follow the instructions in https://github.com/gigascience/gigadb-website/pull/2070 to setup the storage to work local dev. Then, if you follow the same instructions to test in the mentioned PR, nothing should change from a frontend perspective.Also, the playwright tests should pass when you run:
How have functionalities been implemented?
- /tmp:/var/www/datasetfiles
was added. The same volume exists in the web (frontend) container and this is necessary because the frontend needs to be able to access and display the temp logosAny issues with implementation?
Any changes to automated tests?