All entries

    Build a Meal Photo Upload Flow with Progress and Retry

    A meal photo upload needs visible stages for preparing, transferring and confirming the result.

    A meal photograph progresses through transfer error and confirmation icons
    Conceptual pixel-art illustration.

    A meal photo upload needs visible stages for preparing, transferring and confirming the result.

    Build the example

    Use a synthetic photo and an upload endpoint that validates type and size. Resize locally where appropriate, retain the selected file long enough for retry and report byte progress only when the transport exposes it. Once bytes are sent, show a separate processing state until the server confirms completion.

    Use a fake upload that reports 25%, 50%, 100%, then waits before confirming. During that wait, show processing and retain the ability to recover from a timeout. Make the server reject a file whose extension disagrees with its bytes. The client should display a clear reason rather than repeatedly retrying a permanent validation error.

    Watch the failure boundary

    Set an upper bound on prepared file size and make retries reuse the processed copy when possible. Avoid keeping original photos longer than needed. Validate the actual bytes at the server boundary and confirm access to the resulting image independently of the client’s reported upload progress.

    Verify the behavior

    Throttle the network and cancel midway through the upload. Check that cancellation releases local work and leaves no ambiguous saved record. Retry a request after losing the success response. Reuse a request identifier or an existing upload record so the retry does not create another meal entry.

    FURTHER READING

    Sources

    Technical references checked .

    END OF ENTRY / 83
    Eeshan Singh with Big Ben in London
    BEHIND THE JOURNAL

    Eeshan Singh

    I’m Eeshan Singh Pokharia, an AI Full Stack Developer and CoFounder of UltraFit360. I work across AI features, full-stack product development, and web and mobile experiences—from Figma and frontend interactions to the systems behind them.

    Set an upper bound on prepared file size and make retries reuse the processed copy when possible. Avoid keeping original photos longer than needed. Validate the actual bytes at the server boundary and confirm access to the resulting image independently of the client’s reported upload progress.

    Meet the author
    THE CONVERSATION

    Your side of the story.