Skip to content

Catalyst::Request::Upload - add a move_to method #200

@tomredsky

Description

@tomredsky

Request::Upload uses File::Copy to copy the file. File::Copy also provides a move function.

Rationale
When uploading files, it adds to the response time if we have to then copy the same number of bytes from uploadtmp to somewhere else on the file-system. In most cases moving a file is atomic and very fast.

sub move_to {
    my $self = shift;
    return File::Copy::move( $self->tempname, @_ );
}

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