<commit_before>// This is checked on the server, too, but we check it locally to prevent excess
// bandwidth consumption
var supportedMimetypes = [
    'image/jpeg',
    'image/png',
    'image/gif',
    'image/svg+xml',
    'video/mp4',
    'video/ogg',
    'audio/mp3',
    'audio/ogg',
    'audio/mpeg'
];

function browse() {
    var file = document.getElementById('browse');
    file.click();
}

var totalUploads = 0;
var uploads = 0;
var files = [];
var albumAssociated = false;

function uploadUrl(url) {
    var droparea = document.getElementById('droparea');
    droparea.style.overflowY = 'scroll';
    droparea.className = 'files';
    if (totalUploads == 0) {
        document.getElementById('files').innerHTML = '';
        totalUploads++;
    }
    var preview = createPreview({ type: 'image/png', name: url }, url); // Note: we only allow uploading images by URL, not AV
    var p = document.createElement('p');
    p.textContent = 'Uploading...';
    preview.fileStatus.appendChild(p);
    preview.progress.style.width = '100%';<commit_msg>Show album creation UI when uploading URLs<commit_after>// This is checked on the server, too, but we check it locally to prevent excess
// bandwidth consumption
var supportedMimetypes = [
    'image/jpeg',
    'image/png',
    'image/gif',
    'image/svg+xml',
    'video/mp4',
    'video/ogg',
    'audio/mp3',
    'audio/ogg',
    'audio/mpeg'
];

function browse() {
    var file = document.getElementById('browse');
    file.click();
}

var totalUploads = 0;
var uploads = 0;
var files = [];
var albumAssociated = false;

function uploadUrl(url) {
    var droparea = document.getElementById('droparea');
    droparea.style.overflowY = 'scroll';
    droparea.className = 'files';
    if (totalUploads == 0) {
        document.getElementById('files').innerHTML = '';
        totalUploads++;
    }
    if (totalUploads > 1) {
        document.getElementById('createAlbum').className = '';
    }
    var preview = createPreview({ type: 'image/png', name: url }, url); // Note: we only allow uploading images by URL, not AV
    var p = document.createElement('p');
    p.textContent = 'Uploading...';
    preview.fileStatus.appendChild(p);
    preview.progress.style.width = '100%';
{'fraction_non_alphanumeric': 0.1487935656836461, 'fraction_numerical': 0.007596067917783735, 'mean_word_length': 3.2086466165413534, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3985314', 'n_tokens_mistral': 699, 'n_tokens_neox': 676, 'n_words': 181}