Implemented Photo post type, you can now upload a photo and see the photos others uploaded
+ +Security update
diff --git a/WebKit/css/default.css b/WebKit/css/default.css index acfa130..52a2f55 100644 --- a/WebKit/css/default.css +++ b/WebKit/css/default.css @@ -261,4 +261,5 @@ li.mentioned { margin-top: 10px; max-width: 100%; border-radius: 3px; + box-shadow: 0 0 1px black; } \ No newline at end of file diff --git a/WebKit/scripts/helper/Paths.js b/WebKit/scripts/helper/Paths.js index 92a0c32..b2f42b3 100644 --- a/WebKit/scripts/helper/Paths.js +++ b/WebKit/scripts/helper/Paths.js @@ -64,14 +64,16 @@ function(jQuery, HostApp, Hmac) { }); } - Paths.postMultipart = function(url, callback, data, boundary) { + Paths.postMultipart = function(url, callback, data, boundary, accepts) { + + accepts = accepts || "application/vnd.tent.v0+json"; jQuery.ajax({ beforeSend: function(xhr) { - + xhr.setRequestHeader("Accept", accepts); + if (data) xhr.setRequestHeader("Content-Length", data.length); - debug("Content-Length: " + data.length); var user_access_token = HostApp.stringForKey("user_access_token"); @@ -83,12 +85,11 @@ function(jQuery, HostApp, Hmac) { HostApp.secret(), user_access_token ); - debug(auth_header) + xhr.setRequestHeader("Authorization", auth_header); } }, url: url, - accepts: "application/vnd.tent.v0+json", contentType: "multipart/form-data;boundary=" + boundary, type: "POST", complete: callback,