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

feat: upload multiple files #116

Merged
merged 9 commits into from
Jan 27, 2024
Merged

feat: upload multiple files #116

merged 9 commits into from
Jan 27, 2024

Conversation

WallysFerreira
Copy link
Contributor

Solves #59

There's a visual problem with the preview when uploading too many files, but it is still usable
Example of visual bug when uploading 40 files

@WallysFerreira WallysFerreira changed the title feat: upload multiple images or documents feat: upload multiple files Jan 26, 2024
@kevinanielsen
Copy link
Owner

The visual problem needs to be fixed before i can merge this

@WallysFerreira
Copy link
Contributor Author

I've thought about a few ways to solve it

  • Using grids and shrinking the size of the card as the number of files uploaded grows
  • Showing just a list of file names instead of cards when the number of files uploaded is past a certain number

Which one would you advise me to implement?
If you have any other solution in mind I would be glad to implement them too

@kevinanielsen
Copy link
Owner

@WallysFerreira I think the list of filenames would be best - If you could implement that, it would be perfect!

@WallysFerreira
Copy link
Contributor Author

WallysFerreira commented Jan 26, 2024

It now shows a list of file names when uploading more than 7 files (that was the breakpoint I found through experimenting)
From what I've tested it works until about 100 files, then it would start overflowing again, so I added a max height to the div and it doesn't break anymore.

The text on the list might need a little bit of styling too

Copy link
Owner

@kevinanielsen kevinanielsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost everything looks good - Once the change is made, it is ready to be merged!

ui/src/components/upload-preview.tsx Outdated Show resolved Hide resolved
Copy link
Owner

@kevinanielsen kevinanielsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - thank you for the contribution!

@kevinanielsen kevinanielsen merged commit 0fe47fe into kevinanielsen:main Jan 27, 2024
2 checks passed
@kevinanielsen kevinanielsen linked an issue Jan 28, 2024 that may be closed by this pull request
Caixetadev pushed a commit to Caixetadev/go-fast-cdn that referenced this pull request Jan 28, 2024
* feat: add property 'multiple' to file input

* feat: sends multiple documents or images to api

* fix: show icon for each file being uploaded

* fix: refresh page after uploading all files

* chore: add semicolons

* fix: cards overflow

* chore: add EOF

* fix: prevent file name overflow in card

Co-authored-by: Kevin Nielsen <[email protected]>

* chore: fix indentation

---------

Co-authored-by: Kevin Nielsen <[email protected]>
kevinanielsen added a commit that referenced this pull request Jan 30, 2024
* refactor: change folder name

* refactor: page structure

* fix: adding the right module path

* feat: upload multiple files (#116)

* feat: add property 'multiple' to file input

* feat: sends multiple documents or images to api

* fix: show icon for each file being uploaded

* fix: refresh page after uploading all files

* chore: add semicolons

* fix: cards overflow

* chore: add EOF

* fix: prevent file name overflow in card

Co-authored-by: Kevin Nielsen <[email protected]>

* chore: fix indentation

---------

Co-authored-by: Kevin Nielsen <[email protected]>

* feat: support for more OS (#117)

* feat: add support for txt files (#120)

* docs: fix readme link to goreportcard

* chore: fix typos across files (#121)

* Update handleImageResize.go

* fix: successfully typo

* refactor: rename folder

* refactor: remove folder backend

* refactor: move to root

* fix: paths

* build: run go mod tidy

---------

Co-authored-by: Wallys Ferreira <[email protected]>
Co-authored-by: Kevin Nielsen <[email protected]>
Co-authored-by: Kevin Nielsen <[email protected]>
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.

[Feature] Add possibility for uploading multiple images/documents
2 participants