I am creating an external download for an app with an appengine backend.
What I want to do is a file upload solution, and I do not want to use plupload or these turnkey solutions.
I basically posted the images in an iframe, and then put the cover art while it was loading. Then, upon completion, I made an ajax call to get the image ids to display the following. However, the render is always called before the download is complete, so I do not get any image identifiers from the backend. can anyone help?
here is my download code
perform_input3:(event)=> event.preventDefault() $('#product-input-3').hide() $('#product-input-3').submit() $('#upload-cover').show() item_id = $('#item3_id').val() app.views.imageselect.render(item_id)
app.views.imageselect.render (item_id) is below:
render:(data)=> @item_id = data item_id = @item_id $.ajax( url: '/get_image_list/' type: 'GET' dataType: 'json' data: {item_id: item_id} success:(data) => @payload = data $(@el).append imageSelectTemplate(@payload) return @ )
I do not want to use the setTimeout function, because it will not be flexible depending on the connection speed. Any help would be appreciated :)
source share