Creating a file uploader in your component

From Joomla! Documentation

Revision as of 03:20, 7 October 2009 by Gopinathan (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Implementing the SWFUpload Application demo for my component. The joomla document explains only the simple demo ( )

what are the changes i have to do from the joomla doc. How i rewrite the thumbnail picture function for joomla 1.5

I tried so many time but not works out

<?php // This script accepts an ID and looks in the user's session for stored thumbnail data. // It then streams the data to the browser as an image

// Work around the Flash Player Cookie Bug if (isset($_POST["PHPSESSID"])) { session_id($_POST["PHPSESSID"]); }


$image_id = isset($_GET["id"]) ? $_GET["id"] : false;

if ($image_id === false) { header("HTTP/1.1 500 Internal Server Error"); echo "No ID"; exit(0); }

if (!is_array($_SESSION["file_info"]) || !isset($_SESSION["file_info"][$image_id])) { header("HTTP/1.1 404 Not found"); exit(0); }

header("Content-type: image/jpeg") ; header("Content-Length: ".strlen($_SESSION["file_info"][$image_id])); echo $_SESSION["file_info"][$image_id]; exit(0); ?>

Pls help

Regards Gopi