Guest User

Untitled

a guest
Oct 17th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. $(document).ready(function() {
  2.  
  3. $('#image_photo').click(function(event){
  4. event.preventDefault();
  5. });
  6.  
  7. $('#image_photo').uploadify({
  8. uploader : '/uploadify/uploadify.swf',
  9. cancelImg : '/uploadify/cancel.png',
  10. multi : true,
  11. auto : true,
  12. script : '/images',
  13. onComplete : function(event, queueID, fileObj, response, data) {
  14. var dat = eval('(' + response + ')');
  15. $.getScript(dat.upload);},
  16. scriptData : {
  17. '_http_accept': 'application/javascript',
  18. 'format' : 'json',
  19. '_method': 'post',
  20. '<%= session_key %>' : encodeURIComponent('<%= u cookies[session_key] %>'),
  21. 'authenticity_token': encodeURIComponent('<%= u form_authenticity_token %>'),
  22. 'crane_id' : '<%= @crane.id %>'
  23. }
  24. });
  25.  
  26. $('#image_submit').click(function(event){
  27. event.preventDefault();
  28. $('#image_photo').uploadifyUpload();
  29. });
  30.  
  31. });
  32.  
  33.  
  34. Flash object that is showing in html -
  35.  
  36.  
  37. <object id="image_photoUploader" width="110" height="30" type="application/x-shockwave-flash" data="/uploadify/uploadify.swf" style="visibility: visible;">
  38. <param name="quality" value="high">
  39. <param name="wmode" value="opaque">
  40. <param name="flashvars" value="uploadifyID=image_photo&pagepath=/cranes/&script=/images&folder=&scriptData=_http_accept%3Dapplication/javascript%26format%3Djson%26_method%3Dpost%26_rspec_app_session%3DBAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTFjYzkzMWE0NTI4Yzc1N2JjYzM2NzU3MmZjNzA2ZmNjBjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMTdCalpYTUJGSWovdXdHcnRNaE1BUGdiRi9ZdEUxaFk4Z05ucmp0VnFBVTQ9BjsARg%25253D%25253D--ce163f5cd1d0882bb8a7c4d7d543314b567897d2%26authenticity_token%3D7BjZXMBFIj%25252FuwGrtMhMAPgbF%25252FYtE1hY8gNnrjtVqAU4%25253D%26crane_id%3D3&width=110&height=30&wmode=opaque&method=POST&queueSizeLimit=999&simUploadLimit=1&multi=true&auto=true&fileDataName=Filedata">
  41. <param name="allowScriptAccess" value="always">
  42. <param name="allowFullScreen" value="true">
  43. <param name="AllowNetworking" value="all">
  44. </object>
Add Comment
Please, Sign In to add comment