From 0ab885047867ba9b28514e5e4f93136e74837fe5 Mon Sep 17 00:00:00 2001
From: Andreas Fischer <bantu@owncloud.com>
Date: Thu, 8 Aug 2013 21:35:18 +0200
Subject: [PATCH] Adjust JSON code to stable5.

---
 apps/files/ajax/newfile.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php
index 22598ee78e..46149c3e8b 100644
--- a/apps/files/ajax/newfile.php
+++ b/apps/files/ajax/newfile.php
@@ -86,7 +86,8 @@ if($source) {
 	if($success) {
 		$meta = \OC\Files\Filesystem::getFileInfo($target);
 		$id = $meta['fileid'];
-		OCP\JSON::success(array("data" => array('content'=>$content, 'id' => $id, 'mime' => $meta['mimetype'])));
+		$mime = $meta['mimetype'];
+		OCP\JSON::success(array("data" => array('mime'=>$mime, 'content'=>$content, 'id' => $id)));
 		exit();
 	}
 }
-- 
GitLab