{"action":"created","issue":{"url":"https://api.github.com/repos/kartik-v/bootstrap-fileinput/issues/295","labels_url":"https://api.github.com/repos/kartik-v/bootstrap-fileinput/issues/295/labels{/name}","comments_url":"https://api.github.com/repos/kartik-v/bootstrap-fileinput/issues/295/comments","events_url":"https://api.github.com/repos/kartik-v/bootstrap-fileinput/issues/295/events","html_url":"https://github.com/kartik-v/bootstrap-fileinput/issues/295","id":78551496,"number":295,"title":"Initial Preview Bug","user":{"login":"dalamberts","id":3199307,"avatar_url":"https://avatars.githubusercontent.com/u/3199307?v=3","gravatar_id":"","url":"https://api.github.com/users/dalamberts","html_url":"https://github.com/dalamberts","followers_url":"https://api.github.com/users/dalamberts/followers","following_url":"https://api.github.com/users/dalamberts/following{/other_user}","gists_url":"https://api.github.com/users/dalamberts/gists{/gist_id}","starred_url":"https://api.github.com/users/dalamberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalamberts/subscriptions","organizations_url":"https://api.github.com/users/dalamberts/orgs","repos_url":"https://api.github.com/users/dalamberts/repos","events_url":"https://api.github.com/users/dalamberts/events{/privacy}","received_events_url":"https://api.github.com/users/dalamberts/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-20T14:39:19Z","updated_at":"2015-05-20T14:55:28Z","closed_at":null,"body":"Thank you so much for this plugin!\r\n\r\nI have a file input defined as:\r\n```\r\n<input type='file' name='file4' id='file4' class='form-control'>\r\n```\r\n\r\nThe plugin is setup as:. \r\n```\r\n\t\t\t$(document).ready(function() {\r\n\t\t\t\t$('#file4').fileinput({\r\n\t\t\t\t\tuploadUrl : 'https://my.hoodsocial.com/edit_document/118',\r\n\t\t\t\t\tuploadExtraData : function() {\r\n\t\t\t\t\t\tvar obj = {};\r\n\t\t\t\t\t\t$('#add_form').find('input[type!=file], textarea, select').each(function() {\r\n\t\t\t\t\t\t\tvar id = $(this).attr('name'), val = $(this).val();\r\n\t\t\t\t\t\t\tobj[id] = val;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn obj;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tshowUpload : false,\r\n\t\t\t\t\tshowCaption : false,\r\n\t\t\t\t\tshowRemove : false,\r\n\t\t\t\t\tbrowseClass : 'btn btn-primary',\r\n\t\t\t\t\tfileType : 'any',\r\n\t\t\t\t\tbrowseIcon : '',\r\n\t\t\t\t\tbrowseLabel : 'Select file',\r\n\t\t\t\t\tdropZoneEnabled : false,\r\n\t\t\t\t\tuploadAsync : false,\r\n\t\t\t\t\toverwriteInitial : true,\r\n\t\t\t\t\tinitialPreview : [\"<div class='file-preview-text'><h2><i class='glyphicon glyphicon-file'></i></h2></div>\"],\r\n\t\t\t\t\tinitialPreviewConfig : [{\r\n\t\t\t\t\t\tcaption : 'millercoors2014healthfairresponsesheet.docx',\r\n\t\t\t\t\t\twidth : '120px',\r\n\t\t\t\t\t\turl : '/documents/delete_file/118',\r\n\t\t\t\t\t\tkey : 100,\r\n\t\t\t\t\t\textra : {\r\n\t\t\t\t\t\t\tid : 100\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}],\r\n\t\t\t\t\tlayoutTemplates : {\r\n\t\t\t\t\t\tactions : \"<div class='file-actions'><div class='file-footer-buttons'>{delete}</div><div class='clearfix'></div></div>\"\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n```\r\n\r\n\r\nIt shows a file in the initialPreview and I have the overwriteInitial set to true.  I would expect that when I select a file that the content in the initial preview window would get over written but adds a second file into the preview.\r\n\r\nAm I doing something wrong here?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/kartik-v/bootstrap-fileinput/issues/comments/103917493","html_url":"https://github.com/kartik-v/bootstrap-fileinput/issues/295#issuecomment-103917493","issue_url":"https://api.github.com/repos/kartik-v/bootstrap-fileinput/issues/295","id":103917493,"user":{"login":"dalamberts","id":3199307,"avatar_url":"https://avatars.githubusercontent.com/u/3199307?v=3","gravatar_id":"","url":"https://api.github.com/users/dalamberts","html_url":"https://github.com/dalamberts","followers_url":"https://api.github.com/users/dalamberts/followers","following_url":"https://api.github.com/users/dalamberts/following{/other_user}","gists_url":"https://api.github.com/users/dalamberts/gists{/gist_id}","starred_url":"https://api.github.com/users/dalamberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dalamberts/subscriptions","organizations_url":"https://api.github.com/users/dalamberts/orgs","repos_url":"https://api.github.com/users/dalamberts/repos","events_url":"https://api.github.com/users/dalamberts/events{/privacy}","received_events_url":"https://api.github.com/users/dalamberts/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T14:55:28Z","updated_at":"2015-05-20T14:55:28Z","body":"If I remove both the uploadUrl and uploadExtraData, it works as expected."}}