-
Notifications
You must be signed in to change notification settings - Fork 0
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
hpai1
wants to merge
34
commits into
main
Choose a base branch
from
feature/FileUploadPopUp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…/CCIDC-Application-Overhaul into feature/FileUploadPopUp
…le is uploaded or not
…r for loading. changed style to reflect changes and include a delay when closing popup
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
npm install
npm run start
npm install
Navigate to \FileTesting on the localhost and open developer tools. For example
http://localhost:5173/FileTesting
.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.
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:
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.