diff options
Diffstat (limited to 'views/new-post.php')
-rw-r--r-- | views/new-post.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/views/new-post.php b/views/new-post.php index 726a671..7040308 100644 --- a/views/new-post.php +++ b/views/new-post.php @@ -340,6 +340,18 @@ function addNewPhoto() { } $(function(){ + // Check if there's a pending file at the media endpoint + $.getJSON("/new/last-photo.json", function(response){ + if(response.url) { + photos.push({ + url: response.url, + alt: null, + external: true + }); + refreshPhotoPreviews(); + } + }); + $("#note_photo").on("change", function(e){ // If the user has a media endpoint, upload the photo to it right now |