Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. <script>
  2. function randomString(length, chars) {
  3. var result = '';
  4. for (var i = length; i > 0; --i) result += chars[Math.round(Math.random() * (chars.length - 1))];
  5. return result;
  6. }
  7. var sessid = '';
  8. var data = document.getElementById('data');
  9. $(document).ready(function () {
  10.  
  11. $('#myModal').modal({
  12. show: false
  13. });
  14. $('#mm').modal({
  15. show: false
  16. });
  17.  
  18. $(function () {
  19. $('#file_upload').uploadify({
  20. 'fileObjName': 'file',
  21. 'fileSizeLimit': '8MB',
  22. 'buttonText': 'BROWSE FILE(S)...',
  23. 'fileTypeExts': '*.JPEG; *.GIF; *.PNG; *.APNG; *.TIFF; *.BMP; *.PDF; *.XCF',
  24. 'cancelImg': 'uploadify-cancel.png',
  25. 'swf': 'uploadify.swf',
  26. 'uploader': 'uploadify.php',
  27. 'formData': randomString(7, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'),
  28. 'auto': false
  29. });
  30. });
  31. });
  32. </script>
  33.  
  34. if (c.inArray("onUploadSuccess", g.overrideEvents) < 0) {
  35. c("#" + f.id).find(".data").html(" - " + this.settings.post_params);
  36. }
  37.  
  38. $('#file_upload').uploadify({
  39. 'fileObjName': 'file',
  40. 'fileSizeLimit': '8MB',
  41. 'buttonText': 'BROWSE FILE(S)...',
  42. 'fileTypeExts': '*.JPEG; *.GIF; *.PNG; *.APNG; *.TIFF; *.BMP; *.PDF; *.XCF',
  43. 'cancelImg': 'uploadify-cancel.png',
  44. 'swf': 'uploadify.swf',
  45. 'uploader': 'uploadify.php',
  46. 'auto': false,
  47. 'onUploadStart': function() {
  48. $("#file_upload").uploadify('settings',
  49. 'formData',
  50. randomString(7, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')) }
  51. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement