From 631555b553110b2b7772475af04b5278f916f2b4 Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 27 Dec 2013 13:17:23 -0500 Subject: upload button and url --- shader-gif.html | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'shader-gif.html') diff --git a/shader-gif.html b/shader-gif.html index 07cd156..1369225 100644 --- a/shader-gif.html +++ b/shader-gif.html @@ -25,6 +25,7 @@ div { display: inline-block; padding: 10px;} #instructions.dragging iframe { pointer-events: none; } #instructions .close { position: absolute; top: 5px; right: 5px; color: #f00; padding: 3px; border: 0;background: white; font-size: 10px; line-height: 10px; } .close,.remove { cursor: pointer; } +#uploaded-url { display: none; width: 300px; } @@ -70,6 +71,7 @@ div { display: inline-block; padding: 10px;}
+
@@ -378,13 +380,20 @@ function upload(){ blob: blob, filename: filename + "-" + (+new Date()) + ".gif", username: "", - success: function(msg){ - console.log(msg); - status("upload successful: " + msg) + success: function(data){ + + // data.url + // data.filesize + // data.success + + console.log(data); + status("uploaded"); + + $("#uploaded-url").show().focus().val(data.url) }, - error: function(e){ - console.log(e) - status("error uploading: " + e) + error: function(data){ + console.log(data) + status("error uploading: " + data.error) } }); } -- cgit v1.2.3-70-g09d2