Slash Boxes

Slash Open Source Project

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login
Loading... please wait.
  • by acs (1437) on Thursday November 29 2001, @04:01AM (#3736) Homepage Journal
    After slashcode 2.2 it is possible to make uploads using HTTP Upload. This is a possible solutions using the importFile function that exists in some old slashcode:

    sub importFile {
                    # Check for a file upload
                    my $section = $_[0];

                    my $constants = getCurrentStatic ();
                    my $basedir = $constants->{'basedir'};
                    my $rootdir = $constants->{'rootdir'};
                    my $form = getCurrentForm();

                    my $upload = $form->{query_apache}->upload;
                    return '' if !$upload;
                    my $file = $upload->fh;
    In $file you have a file descriptor that points to the upload file.