Skip to content

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

Closed

Description

@isagoico

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

Activity

  1. MelvinBot commented on Aug 1, 2021

    @MelvinBot
    Contributor

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

  2. OSBotify commented on Aug 1, 2021

    @OSBotify
    Contributor

    👋 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.
  3. rushatgabhane commented on Aug 1, 2021

    @rushatgabhane
    Member

    Can reproduce the issue.
    I'm on it.

  4. rushatgabhane commented on Aug 1, 2021

    @rushatgabhane
  5. Santhosh-Sellavel commented on Aug 1, 2021

    @Santhosh-Sellavel
    Collaborator

    @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
  6. rushatgabhane commented on Aug 1, 2021

    @rushatgabhane
    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,

  7. rushatgabhane commented on Aug 1, 2021

    @rushatgabhane
    Member

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

  8. isagoico commented on Aug 3, 2021

    @isagoico
    Author

    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions