Skip to content

FileSize validator reads the entire file into memory #634

Open
@Zverik

Description

@Zverik

I'm looking at this line and either my understanding of Python is lacking, or it does len(file.read()), effectively reading the entire contents of a file into a string variable, then measuring its length, and discarding it.

Shouldn't there be more effective and less memory-consuming ways of getting a file size?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions