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

File upload frontend #115

Merged
merged 12 commits into from
Jun 4, 2020
Merged

File upload frontend #115

merged 12 commits into from
Jun 4, 2020

Conversation

JasonChong96
Copy link
Contributor

@JasonChong96 JasonChong96 commented May 26, 2020

Problem

Implementation of the front-end interface for the file upload feature. With the implementation of the file upload feature, the backend requires credentials to access the S3 bucket. A safety check has been added as a pre-commit hook to ensure any keys are not committed.

[Closes #129]

Solution

  • Update create URL modal to allow for file upload
  • Write relevant fields to FormData
  • Implement actual call to file upload API
  • Wait for file upload backend PR and rebase on develop

Improvements

  • Add pre-commit hook to prevent committing of aws keys
  • MessageType can be added to json responses.
  • Added tests for json.ts
  • File upload feature description has been added to the home page
  • Add file extension support for file uploads and patching
  • Disable caching of objects uploaded to S3 bucket
  • File upload API call now recognises plain text responses as JOI validation does not send json responses.
  • JOI calls to .custom now uses the custom property when returning error messages so that the messages reach the front-end.
  • Removed size prop on most icon widgets as they do not actually scale
  • Remove unnecessary duplicates of snackbars
  • Link click analytics coming soon title should be centralized on mobile
  • Applying filter (not sort) is now extracted into its own action. When a filter is applied, the page number is reset to prevent the client from requesting a now non-existent page number
  • isFile is sets to not null on sequelize

Before & After Screenshots

AFTER:
Desktop
Desktop with file
Desktop file too large
Desktop with link taken
Mobile

@JasonChong96 JasonChong96 marked this pull request as draft May 26, 2020 10:52
@JasonChong96 JasonChong96 force-pushed the file-upload-frontend branch 9 times, most recently from 03314cd to 99f29fc Compare June 1, 2020 11:07
Copy link
Member

@yong-jie yong-jie left a comment

Choose a reason for hiding this comment

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

Incremental review

@JasonChong96 JasonChong96 marked this pull request as ready for review June 1, 2020 18:20
yong-jie
yong-jie previously approved these changes Jun 3, 2020
Copy link
Member

@yong-jie yong-jie left a comment

Choose a reason for hiding this comment

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

lgtm 🤞

src/server/models/url.ts Outdated Show resolved Hide resolved
@liangyuanruo liangyuanruo merged commit 020da53 into develop Jun 4, 2020
@liangyuanruo liangyuanruo deleted the file-upload-frontend branch June 4, 2020 04:44
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.

Add pre-commit hook to detect and prevent AWS keys from being committed
3 participants