From 5cc8de829c0a7b86c8df27293f4825d0e340d592 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Fri, 16 Mar 2012 22:51:12 -0700 Subject: Fixes #14. Fixed uploadify. --- actions/photos/image/ajax_upload.php | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 actions/photos/image/ajax_upload.php (limited to 'actions/photos/image/ajax_upload.php') diff --git a/actions/photos/image/ajax_upload.php b/actions/photos/image/ajax_upload.php new file mode 100644 index 000000000..d6b083cf6 --- /dev/null +++ b/actions/photos/image/ajax_upload.php @@ -0,0 +1,57 @@ +container_guid = $album->getGUID(); +$image->setMimeType($mime); +$image->access_id = $album->access_id; +$image->batch = $batch; + +try { + $image->save($file); + $album->prependImageList(array($image->guid)); + + if (elgg_get_plugin_setting('img_river_view', 'tidypics') === "all") { + add_to_river('river/object/image/create', 'create', $image->getObjectOwnerGUID(), $image->getGUID()); + } + + echo elgg_echo('success'); +} catch (Exception $e) { + // remove the bits that were saved + $image->delete(); + echo $e->getMessage(); +} + +exit; \ No newline at end of file -- cgit v1.2.3