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

User is able to upload a file larger than 50mb #4356

Closed
isagoico opened this issue Aug 1, 2021 · 8 comments
Closed

User is able to upload a file larger than 50mb #4356

isagoico opened this issue Aug 1, 2021 · 8 comments
Assignees
Labels
DeployBlockerCash This issue or pull request should block deployment Engineering Hourly KSv2

Comments

@isagoico
Copy link

isagoico commented Aug 1, 2021

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Issue is failing #4269 for Android

Action Performed:

  1. Open the app and log in
  2. Navigate to a conversation
  3. Click on add attachment
  4. Select a file larger than 50mb

Expected Result:

There should be a message saying that the file must be under 50mb to upload

Actual Result:

There's a thumbnail for the attachment with a spinner and the file is not uploaded

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Android

Version Number: 1.0.82-0

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos:
We were unable to check if this issue is reproducible in iOS since the build is failing.

Screen_Recording_20210801-132457_Expensifycash.mp4

Expensify/Expensify Issue URL:

View all open jobs on Upwork

@isagoico isagoico added DeployBlockerCash This issue or pull request should block deployment Engineering Daily KSv2 labels Aug 1, 2021
@MelvinBot
Copy link

Triggered auto assignment to @timszot (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@isagoico isagoico mentioned this issue Aug 1, 2021
5 tasks
@github-actions github-actions bot added Hourly KSv2 and removed Daily KSv2 labels Aug 1, 2021
@OSBotify
Copy link
Contributor

OSBotify commented Aug 1, 2021

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@rushatgabhane
Copy link
Member

Can reproduce the issue.
I'm on it.

@rushatgabhane

This comment has been minimized.

@Santhosh-Sellavel
Copy link
Collaborator

Santhosh-Sellavel commented Aug 1, 2021

@rushatgabhane I've missed your comments was checking this issue. I've narrowed it down and handled,

Proposal

Need to change the following lines,

pickAttachment(attachment) {
if (attachment) {
if (attachment.width === -1 || attachment.height === -1) {
this.showImageCorruptionAlert();
return;
}
const result = getDataForUpload(attachment);
this.completeAttachmentSelection(result);
}
}

As shown below,
Screenshot 2021-08-02 at 12 35 33 AM

We can change Growl to Alert if needed(this is mobile-only issue we can use native Alert also), thanks!

Demo:

Screen_Recording_20210802-004726_Expensifycash.mp4

@rushatgabhane
Copy link
Member

Update: fix is ready.

Just needed to pass size: fileData.size over here.

function getDataForUpload(fileData) {
return {
name: fileData.fileName || fileData.name || 'chat_attachment',
type: fileData.type,
uri: fileData.uri,

@rushatgabhane
Copy link
Member

@Santhosh-Sellavel Thanks for your input!
Pushed a simpler fix instead.

@isagoico
Copy link
Author

isagoico commented Aug 3, 2021

Retest for this was a pass! Closing the issue 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DeployBlockerCash This issue or pull request should block deployment Engineering Hourly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants