diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2012-03-16 22:51:12 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2012-03-16 22:51:12 -0700 |
commit | 5cc8de829c0a7b86c8df27293f4825d0e340d592 (patch) | |
tree | 62b71d96d02fce3a75393da08219714fdad4789d /actions/ajax_upload.php | |
parent | e6e33ca1a7afb00a855f57df5a5263674b23c93c (diff) | |
download | elgg-5cc8de829c0a7b86c8df27293f4825d0e340d592.tar.gz elgg-5cc8de829c0a7b86c8df27293f4825d0e340d592.tar.bz2 |
Fixes #14. Fixed uploadify.
Diffstat (limited to 'actions/ajax_upload.php')
-rw-r--r-- | actions/ajax_upload.php | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/actions/ajax_upload.php b/actions/ajax_upload.php deleted file mode 100644 index 1f5588197..000000000 --- a/actions/ajax_upload.php +++ /dev/null @@ -1,61 +0,0 @@ -<?php -/** - * Elgg single upload action for flash/ajax uploaders - * - */ - -include_once dirname(dirname(__FILE__)) . "/lib/upload.php"; - -$album_guid = (int) get_input('album_guid'); -$file_var_name = get_input('file_var_name', 'Image'); - -$album = get_entity($album_guid); -if (!$album) { - exit; -} - -// probably POST limit exceeded -if (empty($_FILES)) { - echo 'Image was too large'; - exit; -} - -$image_lib = get_plugin_setting('image_lib', 'tidypics'); -if (!$image_lib) { - $image_lib = "GD"; -} - -$temp_file = $_FILES['Image']['tmp_name']; -$name = $_FILES['Image']['name']; -$file_size = $_FILES['Image']['size']; - -$mime = tp_upload_get_mimetype($name); -if ($mime == 'unknown') { - echo 'Not an image'; - exit; -} - -$image = new TidypicsImage(); -$image->container_guid = $album_guid; -$image->setMimeType($mime); -$image->simpletype = "image"; -$image->access_id = $album->access_id; -$image->title = substr($name, 0, strrpos($name, '.')); -$image->batch = get_input('batch'); -$result = $image->save(); - -$image->setOriginalFilename($name); -$image->saveImageFile($temp_file, $file_size); - -$image->extractExifData(); -$image->saveThumbnails($image_lib); - -$album->prependImageList(array($image->guid)); - - -if (get_plugin_setting('img_river_view', 'tidypics') === "all") { - add_to_river('river/object/image/create', 'create', $image->owner_guid, $image->guid); -} - -echo "success"; -exit;
\ No newline at end of file |