Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/file upload pop up #38

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open

Feature/file upload pop up #38

wants to merge 34 commits into from

Conversation

hpai1
Copy link
Contributor

@hpai1 hpai1 commented Apr 15, 2024

Tracking Info

Resolves #6

Changes

Added a new page called FileTesting to house the File Upload modal. On FileTesting.tsx, you can see a button component that invokes the FileUploadPopup when clicked. This allows you to style the button any way you want and still be able to retain the functionality.

The bulk of the code is in the file FileUploadPopupWindow.tsx. It contains all the code to add files to the backend, drag and drop files, and delete files.

I might have installed some new packages so be sure to run npm install first.

Testing

  1. Run npm install
  2. Start the backend by going into the backend directory and running npm run start
  3. Start the frontend by going into the frontend directory and running npm install

Navigate to \FileTesting on the localhost and open developer tools. For example http://localhost:5173/FileTesting.

Screenshot 2024-04-15 at 8 21 20 AM

It should look similar to the above screenshot.

Click on the File Upload button (not styled at all) and choose 1 or multiple files. Note that the maximum limit is 10.

Screenshot 2024-04-15 at 8 46 35 AM

As your files are uploading, you should see the progress bar changing. Also, the console will say File Uploaded Successfully to ensure that it has been uploaded. From the backend, we can see that the files were actually uploaded:

Screenshot 2024-04-15 at 8 32 43 AM

If you click the 'x' on the file list, we see that the file goes away and the console says the file has been deleted. On google drive, we also see that the file gets deleted automatically.

Screenshot 2024-04-15 at 8 33 30 AM

@hpai1 hpai1 requested a review from Miyuki-L as a code owner April 15, 2024 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File Upload
2 participants