Custom module - how to upload files?

Custom module - how to upload files?

Tuesday 21 December 2004 3:00:11 am - 3 replies

Modified on Tuesday 21 December 2004 3:04:14 am by Roy Bøhmer

Author Message

Roy Bøhmer

Tuesday 21 December 2004 3:12:23 am

Just some more info:

$_FILES['FileToImport'] result in a warning: Undefined index.

Eirik Alfstad Johansen

Tuesday 21 December 2004 3:34:35 am

Hi Roy,

Here's what I use with success in my own custom module:

	if(is_uploaded_file($_FILES['filename']['tmp_name']))
	{
		echo "File uploaded successfully.";
	}

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Roy Bøhmer

Tuesday 21 December 2004 3:55:32 am

Thanks for your quick reply!

I found the error: The form-tag in the template were missing enctype="multipart/form-data". (arrgh..)

I still appreciating you response, Eirik!

Roy

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.