-
Notifications
You must be signed in to change notification settings - Fork 2
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/Upload_media #74
base: master
Are you sure you want to change the base?
Conversation
-Added file size limit while uploading -Changed the label from image to attachment
@@ -4,24 +4,85 @@ import { s3GetPresignedUrl} from 'apis/utils/mediaUpload/awsmedia'; | |||
import Loader from 'modules/Auth/components/Loader'; | |||
import { useEffect, useState } from 'react'; | |||
|
|||
export const ImageS3Tag = ({ path }) => { | |||
const [srcImg, setSrcImg] = useState<string | undefined>(); | |||
export const MediaS3Tag = ({ path }: { path: string }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the type definition affects readability in this case
- Define individual parameters with individual types
export const MediaS3Tag = (path: string) => {
- Define an interface for parameter object
interface MediaS3TagParams {
path: string;
}
export const MediaS3Tag = ({path}: MediaS3TagParams) => {
src/modules/shared/UploadBucket.tsx
Outdated
const oversizedFile = selectedFiles.find((file) => file.size > MAX_FILE_SIZE); | ||
|
||
if (oversizedFile) { | ||
setErrorMessage(`File size exceeds limit: ${oversizedFile.name}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File exceeds size limit
seems more clear?
return <CircularProgress />; | ||
} | ||
|
||
if (fileType === 'pdf') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should'nt be dependent on file extension to determine file type.
-Added the view and Download button -Reframed the error message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make changes discussed in the meeting.
-Used the usequery to fetch image
-Added feature can upload pdf ,vedio, excel
-Added file size limit while uploading
-Changed the label from image to attachment