PageSourceSearch

https://my.hostiman.ru/front/fileUploads.js

js hostiman.ru collected 2026-10-04 13:47:35 UTC 1,438 bytes, 40 lines download raw bytes

1let fileuploadsListFiles = (function(input, id){
2    let fileList = '';
3    if(input.length > 0){
4        fileList = '<br/>';
5        let allowed, fileIsAllowed;
6
7        if(typeof $('#attachment').attr('data-allowed-extensions') !== 'undefined') {
8            allowed = $.parseJSON($('#attachment').attr('data-allowed-extensions'));
9        }else {
10            allowed = false;
11        }
12
13
14        $.each(input, function(i, j){
15            let extension = $(this).attr('name').substr( ($(this).attr('name').lastIndexOf('.') +1) );
16
17            if(allowed !== false) {
18                fileIsAllowed = ($.inArray(extension.toLowerCase(), allowed) >= 0);
19            }else{
20                fileIsAllowed = true;
21            }
22
23            if(fileIsAllowed) {
24                fileList += '<i class="flaticon-attachment"></i> ' + $(this).attr('name') + ' (' + humanFileSize($(this).attr('size')) + ')<br/>';
25            }else{
26                fileList += '<span class="kt-font-danger"><i class="flaticon-attachment"></i> ' + $(this).attr('name') + ' не загружен: расширение файла запрещено к загрузке</span><br/>';
27            }
28        });
29        $('#file-list-'+id).html(fileList);
30    }
31
32    return true;
33});
34
35$(document).ready(function(){
36    $('input#attachment').change(function(){
37        let id = $(this).attr('data-id');
38        fileuploadsListFiles($(this).get(0).files, id);
39    });
40});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.