Skip to content

Incorrect downloaded data #10

@luyi985

Description

@luyi985

Hi mate

I find this line in your code seems not correct
https://github.com/FdezRomero/request-image-size/blob/master/index.js#L65
If it does return the buffer size(how many bytes) of the img, maybe we should set size.downloaded = Buffer.byteLength(buffer, ''utf8'')

Ref
https://nodejs.org/api/buffer.html#buffer_class_method_buffer_bytelength_string_encoding

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions