{"id":346,"date":"2016-09-21T17:19:14","date_gmt":"2016-09-21T17:19:14","guid":{"rendered":"https:\/\/www.winchesterprinters.com\/?page_id=346"},"modified":"2020-04-24T22:43:36","modified_gmt":"2020-04-24T22:43:36","slug":"filemanager","status":"publish","type":"page","link":"https:\/\/www.winchesterprinters.com\/index.php\/filemanager\/","title":{"rendered":"File Manager"},"content":{"rendered":"<p>[et_pb_section admin_label=&#8221;section&#8221;][et_pb_row admin_label=&#8221;Row&#8221;][et_pb_column type=&#8221;4_4&#8243;][et_pb_text admin_label=&#8221;Text&#8221; background_layout=&#8221;light&#8221; text_orientation=&#8221;left&#8221; use_border_color=&#8221;off&#8221; border_color=&#8221;#ffffff&#8221; border_style=&#8221;solid&#8221;]<\/p>\n<p><strong>Welcome to The Winchester Printers File Uploader.<\/strong> We have streamlined the upload process to make it easier to get your files to us. Simply fill out the form and either click the &#8220;Upload Files&#8221; button, or drag and drop your files over the Uploader Window below. You will then be prompted to name your files and add any optional instructions to each file.<\/p>\n<p>If you have any problem uploading files in this manner, we can send you FTP instructions.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row admin_label=&#8221;row&#8221;][et_pb_column type=&#8221;4_4&#8243;][et_pb_text admin_label=&#8221;Text&#8221;] \n<link rel=\"stylesheet\" type=\"text\/css\" href=\"https:\/\/www.winchesterprinters.com\/wp-content\/plugins\/nm-file-upload-manager-pro-jeremy\/templates\/_template_main_style.css\" \/>\n\n<input type=\"hidden\" name=\"parent_id\" value=\"0\">\n<div id=\"the-file-directory\"><ul> \t<li><a href=\"#tabs-file\">Upload files<\/a><\/li><\/ul><div id=\"tabs-file\">\n\n<form id=\"form-save-new-file\" style=\"background-color: #e8e8e8\">\n  \n \t<div id=\"nm-uploadfile\" class=\"nm-uploader-area\">\n        <input name=\"nm_name\" id=\"nm_name\" type=\"text\" placeholder='Name' width=\"50\" required \/> \n        <input name=\"nm_email\" id=\"nm_email\" type=\"text\" placeholder='Email' required \/> \n        <input name=\"nm_phone\" id=\"nm_phone\" type=\"text\" placeholder='Phone' required \/> \n        <input name=\"nm_wpi_contact\" id=\"nm_wpi_contact\" type=\"text\" placeholder='WPI Contact' required \/>\n        <input name=\"nm_print_job\" id=\"nm_print_job\" type=\"text\" placeholder='Name of Print Job' required \/> \n\n\t    <div id=\"container_buttons\">\n\t        <div class=\"btn_center\">\n\t            <a id=\"select-button\" class=\"button\" href=\"javascript:;\" style=\"background-color: #1e73be; color: #fff\">\n\t\t\t\t\t<i class=\"fa fa-upload fonticons\"><\/i>\n\t                Upload Files\t            <\/a>\n\t            \t        <\/div>\n\t    <\/div>\n\t    <div id=\"filelist-uploadfile\" class=\"filelist\">\n\t        \n\t        \n\t    <\/div>\n\t<\/div>\n\t<div id=\"fileupload-button-bar\" class=\"clearfix\">\n\t\t        <input name=\"file_term_id\" type=\"hidden\" value=\"0\" \/> \n\t\t<input id=\"fileupload-button\" type=\"submit\" value=\"Save\" \/>\n\t\t<p style=\"text-align:center;margin-top: 25px;\" id=\"nm-saving-file\"><\/p> \n\t<\/div>\n\n\t<input type=\"hidden\" id=\"nm_filemanager_nonce\" name=\"nm_filemanager_nonce\" value=\"57fd8f54b5\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/index.php\/wp-json\/wp\/v2\/pages\/346\" \/><\/form>\n\n<script>\n\t<!--\n\tvar file_count_filemanager = 1;\n\tvar running_quota = 0;\n\tvar uploader_filemanager;\n\t\n\tjQuery(document).ready(function($) {\n    $('.tabs .tab-links a').on('click', function(e)  {\n        var currentAttrValue = $(this).attr('href');\n \n        \/\/ Show\/Hide Tabs\n        $('.tabs ' + currentAttrValue).show().siblings().hide();\n \n        \/\/ Change\/remove current tab to active\n        $(this).parent('li').addClass('active').siblings().removeClass('active');\n \n        e.preventDefault();\n    });\n\n    $('#fileupload-button').on('click', function(e)  {\n    \te.preventDefault();\n\t\tif ($('#nm_name').val() == '' ) {\n\t\t\talert('Please enter Name.');\n\t\t} else if ($('#nm_email').val() == '') {\n\t\t\talert('Please enter Email.');\n\t\t} else if ($('#nm_phone').val() == '') {\n\t\t\talert('Please enter Phone.');\n\t\t} else if ($('#nm_wpi_contact').val() == '') {\n\t\t\talert('Please enter Contact.');\n\t\t} else if ($('#nm_print_job').val() == '') {\n\t\t\talert('Please enter Name of print job.');\n\t\t} else {\n    \t\t$('#form-save-new-file').submit();\n\t\t}\n    });\n    \n\n    \/\/ file uploader script\n    var $filelist_DIV = $('#filelist-uploadfile');\n    uploader_filemanager = new plupload.Uploader({\n\t\truntimes \t\t\t: 'html5,flash,silverlight,html4,browserplus,gear',\n\t\tbrowse_button \t\t: 'select-button', \/\/ you can pass in id...\n\t\tcontainer\t\t\t: 'nm-uploadfile', \/\/ ... or DOM Element itself\n\t\tdrop_element\t\t: 'nm-uploadfile',\n\t\turl \t\t\t\t: 'https:\/\/www.winchesterprinters.com\/wp-admin\/admin-ajax.php',\n\t\t\/\/multipart_params \t: {'action' : 'nm_filemanager_upload_file'},\n\t\tmax_file_size \t\t: '10000mb',\n\t\tmax_file_count \t\t: 10,\n\t\tfilesize_quota \t\t: 0,\n\t\tsize_used\t\t\t: 0,\n\t    \n\t    chunk_size: '1mb',\n\t\t\n\t    \/\/ Flash settings\n\t\tflash_swf_url \t\t: 'https:\/\/www.winchesterprinters.com\/wp-content\/plugins\/nm-file-upload-manager-pro-jeremy\/js\/plupload-2.1.2\/js\/uploader\/Moxie.swf',\n\t\t\/\/ Silverlight settings\n\t\tsilverlight_xap_url : 'https:\/\/www.winchesterprinters.com\/wp-content\/plugins\/nm-file-upload-manager-pro-jeremy\/js\/plupload-2.1.2\/js\/uploader\/Moxie.xap',\n\t\t\n\t\tfilters : {\n\t\t\tmime_types: [\n\t\t\t\t{title : \"Filetypes\", extensions : \"jpg,png,zip,psd,pdf,ai,tif,eps,xls\"}\n\t\t\t]\n\t\t},\n\t\t\n\t\tinit: {\n\t\t\tPostInit: function() {\n\t\t\t\t$filelist_DIV.html('');\n\n\t\t\t},\n\t\t\t\n\t\t\tBeforeUpload: function(up, file){\n\t\t\t\t\n\t\t\t\t\/\/ console.log(file.name);\n\t\t\t\tup.settings.multipart_params = {\n\t\t            filename: file.name,\n\t\t            action : 'nm_filemanager_upload_file'\n\t\t        };\n\t\t\t},\n\n\t\t\tFilesAdded: function(up, files) {\n\n\t\t\t\tvar files_added = up.files.length;\n\t\t\t\tvar max_count_error = false;\n\t\t\t\tvar user_quota_error = false;\n\n\t\t\t    plupload.each(files, function (file) {\n\t\t\t    \tif(file_count_filemanager <= uploader_filemanager.settings.max_file_count){\n\t\t\t\t\t\tif ((running_quota + file.size + uploader_filemanager.settings.size_used) <= uploader_filemanager.settings.filesize_quota || uploader_filemanager.settings.filesize_quota == '') {\n\t\t\t        \t\t\/\/ Code to add pending file details, if you want\n\t\t\t\t            add_thumb_box(file, $filelist_DIV, up);\n\t\t\t\t            setTimeout('uploader_filemanager.start()', 100);\n\t\t\t\t\t\t\trunning_quota += file.size;\n\t\t\t\t            file_count_filemanager++;\n\t\t\t      \t\t}else{\n\t\t\t\t\t\t\tuser_quota_error = true;\n\t\t\t\t\t\t}\n\t\t\t        }else{\n\t\t\t            max_count_error = true;\n\t\t\t        }\n\t\t\t        \n\t\t\t        \n\t\t\t    });\n\n\t\t\t    \n\t\t\t    if(max_count_error){\n\t\t\t    \talert(10 + nm_filemanager_vars.message_max_files_limit);\n\t\t\t    }\n\t\t\t\tif(user_quota_error){\n\t\t\t    \talert('You are exceeding your file size quota');\n\t\t\t\t\t\/\/location.reload();\n\t\t\t    }\n\n\t\t\t    \n\t\t\t},\n\t\t\t\n\t\t\tFileUploaded: function(up, file, info){\n\t\t\t\t\n\t\t\t\t\/* console.log(up);\n\t\t\t\tconsole.log(file);*\/\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$filelist_DIV.find('#u_i_c_' + file.id).find('.file-thumb-title-description').show();\n\t\t\t\t$('#fileupload-button-bar').show();\n\t\t\t\t\n\t\t\t\tvar obj_resp = $.parseJSON(info.response);\n\t\t\t\tconsole.log(obj_resp);\n\t\t\t\tvar file_thumb \t= ''; \n\n\t\t\t\n\t\t\t\t\/\/ checking if uploaded file is thumb\n\t\t\t\text = obj_resp.file_name.substring(obj_resp.file_name.lastIndexOf('.') + 1);\t\t\t\t\t\n\t\t\t\text = ext.toLowerCase();\n\t\t\t\t\n\t\t\t\tif(ext == 'png' || ext == 'gif' || ext == 'jpg' || ext == 'jpeg'){\n\n\t\t\t\t\t$.each(obj_resp.thumb_meta, function(i, item){\n\t\t\t\t\t\tfile_thumb = nm_filemanager_vars.file_upload_path_thumb + item.name;\n\t\t\t\t\t\t$filelist_DIV.find('#u_i_c_' + file.id).find('.u_i_c_thumb').append('<img decoding=\"async\" width=\"150\" src=\"'+file_thumb+ '\" id=\"thumb_'+file.id+'\" \/>');\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tvar file_full \t= nm_filemanager_vars.file_upload_path + obj_resp.file_name;\n\t\t\t\t\t\/\/ thumb thickbox only shown if it is image\n\t\t\t\t\t$filelist_DIV.find('#u_i_c_' + file.id).find('.u_i_c_thumb').append('<div style=\"display:none\" id=\"u_i_c_big' + file.id + '\"><img decoding=\"async\" src=\"'+file_full+ '\" \/><\/div>');\n\t\t\t\t\t\n\t\t\t\t\t\/\/ zoom effect\n\t\t\t\t\t$filelist_DIV.find('#u_i_c_' + file.id).find('.u_i_c_tools_zoom').append('<a href=\"#TB_inline?width=900&height=500&inlineId=u_i_c_big'+file.id+'\" class=\"thickbox\" title=\"'+obj_resp.file_name+'\"><img decoding=\"async\" width=\"15\" src=\"'+nm_filemanager_vars.plugin_url+'\/images\/zoom.png\" \/><\/a>');\n\t\t\t\t\tis_image = true;\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$filelist_DIV.find('#u_i_c_' + file.id).find('.u_i_c_thumb').html('<i class=\"fa fa-file-text fonticonfiles\"><\/i>');\n\t\t\t\t\tis_image = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\/\/ adding checkbox input to Hold uploaded file name as array\n\t\t\t\t$filelist_DIV.append('<input style=\"display:none\" checked=\"checked\" type=\"checkbox\" value=\"'+obj_resp.file_name+'\" name=\"uploaded_files['+file.id+']\" \/>');\n\t\t\t\t\n\t\t\t\t\/\/file name\t\n\t\t\t\t$filelist_DIV.find('#u_i_c_' + file.id).find('.progress_bar').html(obj_resp.file_name);\n\t\t\t\n\t\t\t},\n\n\t\t\tUploadProgress: function(up, file) {\n\t\t\t\t\/\/document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + \"%<\/span>\";\n\t\t\t\t\/\/console.log($filelist_DIV.find('#' + file.id).find('.progress_bar_runner'));\n\t\t\t\t$filelist_DIV.find('#u_i_c_' + file.id).find('.progress_bar_number').html(file.percent + '%');\n\t\t\t\t$filelist_DIV.find('#u_i_c_' + file.id).find('.progress_bar_runner').css({'display':'block', 'width':file.percent + '%'});\n\t\t\t},\n\n\t\t\tError: function(up, err) {\n\t\t\t\t\/\/document.getElementById('console').innerHTML += \"\\nError #\" + err.code + \": \" + err.message;\n\t\t\t\talert(\"\\nError #\" + err.code + \": \" + err.message);\n\t\t\t}\n\t\t}\n\t\t\n\n\t});\n\n    uploader_filemanager.init();\n    \n    \/\/ delete file\n\t\t\t$(\".nm-file-thumb\").find('.u_i_c_tools_del > a').on('click', function(){\n\n\t\t\t\t\/\/console.log($(this));\n\t\t\t\tvar a = confirm(nm_filemanager_vars.delete_file_message);\n\t\t\t\tif(a){\n\t\t\t\t\t\/\/ it is removing from uploader instance\n\t\t\t\t\tvar fileid = $(this).attr(\"data-fileid\");\n\t\t\t\t\tuploader_filemanager.removeFile(fileid);\n\n\t\t\t\t\tvar filename  = jQuery('input:checkbox[name=\"uploaded_files['+fileid+']\"]').val();\n\t\t\t\t\t\n\t\t\t\t\t\/\/ it is removing physically if uploaded\n\t\t\t\t\tjQuery(\"#u_i_c_\"+fileid).find('img').attr('src', nm_filemanager_vars.plugin_url+'\/images\/loading.gif');\n\t\t\t\t\t\n\t\t\t\t\t\tvar data = {action: 'nm_filemanager_delete_file_new', file_name: filename};\n\t\t\t\t\t\n\t\t\t\t\t\tjQuery.post(nm_filemanager_vars.ajaxurl, data, function(resp){\n\t\t\t\t\t\t\talert(resp.message);\n\t\t\t\t\t\t\tjQuery(\"#u_i_c_\"+fileid).hide(500).remove();\n\n\t\t\t\t\t\t\t\/\/ it is removing for input Holder\n\t\t\t\t\t\t\tjQuery('input:checkbox[name=\"uploaded_files['+fileid+']\"]').remove();\n\t\t\t\t\t\t\trunning_quota -= resp.file_size;\n\t\t\t\t\t\t\tfile_count_filemanager--;\n\t\t\t\t\t\t\n\t\t\t\t\t}, 'json');\n\t\t\t\t}\n\t\t\t});\n\n});\n\n\n\t\n\tfunction add_thumb_box(file, $filelist_DIV){\n\t\t\n\t\tvar inner_html \t\t= '<div class=\"file-thumb-title-description\" style=\"display:none\">';\n\t\t\t\tinner_html \t\t+= '<div class=\"nm-file-thumb\">';\n\t\t\t\tinner_html \t\t+= '<div class=\"u_i_c_thumb\"><\/div>';\n\t\t\t\tinner_html\t\t+= '<span class=\"u_i_c_tools_zoom\"><\/span> ';\n\t\t\t\tinner_html\t\t+= '<span class=\"u_i_c_tools_del\"><a href=\"javascript:;\" data-fileid=\"' + file.id+'\" title=\"Delete\"><img decoding=\"async\" width=\"15\" src=\"'+nm_filemanager_vars.plugin_url+'\/images\/delete.png\" \/><\/a><\/span>';\n\t\t\t\t        \n\t\t    \tinner_html\t\t+= '<\/div>';\n\t\t    \n\t\t\t    inner_html\t\t+= '<div class=\"nm-file-title-description\">';\n\t\t\t    inner_html\t\t+= '<input name=\"file_title['+file.id+']\" type=\"text\" placeholder=\"File title\" \/>';\n\t\t\t    inner_html\t\t+= '<textarea name=\"file_description['+file.id+']\" rows=\"5\" placeholder=\"Description (optional)\"><\/textarea>';\n\t\t\t    inner_html\t\t+= '<\/div>';\n\t\t\t    \n\t\t\t    inner_html \t\t+= '<p class=\"file-add-meta-data\"><\/p>';\n\t\t    \n\t\t    \tinner_html\t\t+= '<div class=\"clear\"><\/div>';\n\t\t    \t\n\t\t    inner_html\t\t+= '<\/div>';\n\t\t\t\n\t\t\tinner_html\t\t+= '<div class=\"progress_bar\"><span class=\"progress_bar_runner\"><\/span><span class=\"progress_bar_number\">(' + plupload.formatSize(file.size) + ')<span><\/div>';\n\t\t\n\t\tjQuery( '<div \/>', {\n\t\t\t'id'\t: 'u_i_c_'+file.id,\n\t\t\t'class'\t: 'u_i_c_box',\n\t\t\t'html'\t: inner_html,\n\t\t\t\n\t\t}).appendTo($filelist_DIV);\n\n\t\t\/\/ clearfix\n\t\t\/\/ 1- removing last clearfix first\n\t\t$filelist_DIV.find('.u_i_c_box_clearfix').remove();\n\t\t\n\t\tjQuery( '<div \/>', {\n\t\t\t'class'\t: 'u_i_c_box_clearfix',\t\t\t\t\n\t\t}).appendTo($filelist_DIV);\n\t}\n\t\/\/-->\n<\/script><\/div><\/div> [\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to The Winchester Printers File Uploader. We have streamlined the upload process to make it easier to get your files to us. Simply fill out the form and either click the &#8220;Upload Files&#8221; button, or drag and drop your files over the Uploader Window below. You will then be prompted to name your files [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"[nm-wp-file-uploader]","_et_gb_content_width":"","footnotes":""},"class_list":["post-346","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.winchesterprinters.com\/index.php\/wp-json\/wp\/v2\/pages\/346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winchesterprinters.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.winchesterprinters.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.winchesterprinters.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winchesterprinters.com\/index.php\/wp-json\/wp\/v2\/comments?post=346"}],"version-history":[{"count":6,"href":"https:\/\/www.winchesterprinters.com\/index.php\/wp-json\/wp\/v2\/pages\/346\/revisions"}],"predecessor-version":[{"id":5939,"href":"https:\/\/www.winchesterprinters.com\/index.php\/wp-json\/wp\/v2\/pages\/346\/revisions\/5939"}],"wp:attachment":[{"href":"https:\/\/www.winchesterprinters.com\/index.php\/wp-json\/wp\/v2\/media?parent=346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}