GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DANCER2::CORE::REQUEST::UPLOAD (3)

.ds Aq ’

NAME

Dancer2::Core::Request::Upload - Class representing file upload requests

CONTENTS

VERSION

version 0.166001

DESCRIPTION

This class implements a representation of file uploads for Dancer2. These objects are accessible within route handlers via the request->uploads keyword. See Dancer2::Core::Request for details.

ATTRIBUTES

    filename

Filename as sent by client. optional. May not be undef.

    tempname

The name of the temporary file the data has been saved to. Optional. May not be undef.

    headers

A hash ref of the headers associated with this upload. optional. is read-write and a HashRef.

    size

The size of the upload, in bytes. Optional.

METHODS

my CW$filename=$upload->filename;

Returns the filename (full path) as sent by the client.

my CW$tempname=$upload->tempname;

Returns the name of the temporary file the data has been saved to.

For example, in directory /tmp, and given a random name, with no file extension.

my CW$href=$upload->headers;

Returns a hashRef of the headers associated with this upload.

my CW$fh=$upload->file_handle;

Returns a read-only file handle on the temporary file.

CW$upload->copy_to(’/path/to/target’)

Copies the temporary file using File::Copy. Returns true for success, false for failure.

CW$upload->link_to(’/path/to/target’);

Creates a hard link to the temporary file. Returns true for success, false for failure.

my CW$content=$upload->content;

Returns a scalar containing the contents of the temporary file.

my CW$basename=$upload->basename;

Returns basename for filename.

CW$upload->type

Returns the Content-Type of this upload.

SEE ALSO

Dancer2

AUTHOR

Dancer Core Developers

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Alexis Sukrieh.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DANCER2::CORE::REQUEST::UPLOAD (3) 2016-01-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.