<commit_before>angular.module('media_manager')
.service('Droplet', ['$timeout', '$log', '$q', 'AppConfig', function($timeout, $log, $q, AppConfig){
  var ds = this;
  var ONE_MEGABYTE = 1000000; // bytes
  var ALLOWED_EXTENSIONS = ['png', 'jpg', 'jpeg', 'gif', 'zip', 'tif', 'tiff'];

  ds.interface = null;

  ds.requestHeaders = {
    'Accept': 'application/json',
    'Authorization': AppConfig.authorization_header
  };

  ds.limits = {
    uploadSize:  200 * ONE_MEGABYTE,
    zipSize:     200 * ONE_MEGABYTE,
    imageSize:    20 * ONE_MEGABYTE
  };

  ds.validators = [
    {
      "name": "valid_file_type",
      "fn": function(model, errors) {
          var msg;
          var is_valid = (model.type == ds.interface.FILE_TYPES.VALID);
          if (is_valid) {
            return true;
          } else {
            msg = "Invalid image: '" + model.file.name +"'. Cannot upload file with extension '" + model.extension + "'. File extension must be one of: " + ds.allowedExtensions.join(", ");
            errors.push(msg);<commit_msg>Bumped UI image size limit to 50mb.<commit_after>angular.module('media_manager')
.service('Droplet', ['$timeout', '$log', '$q', 'AppConfig', function($timeout, $log, $q, AppConfig){
  var ds = this;
  var ONE_MEGABYTE = 1000000; // bytes
  var ALLOWED_EXTENSIONS = ['png', 'jpg', 'jpeg', 'gif', 'zip', 'tif', 'tiff'];

  ds.interface = null;

  ds.requestHeaders = {
    'Accept': 'application/json',
    'Authorization': AppConfig.authorization_header
  };

  ds.limits = {
    uploadSize:  200 * ONE_MEGABYTE,
    zipSize:     200 * ONE_MEGABYTE,
    imageSize:    50 * ONE_MEGABYTE
  };

  ds.validators = [
    {
      "name": "valid_file_type",
      "fn": function(model, errors) {
          var msg;
          var is_valid = (model.type == ds.interface.FILE_TYPES.VALID);
          if (is_valid) {
            return true;
          } else {
            msg = "Invalid image: '" + model.file.name +"'. Cannot upload file with extension '" + model.extension + "'. File extension must be one of: " + ds.allowedExtensions.join(", ");
            errors.push(msg);
{'fraction_non_alphanumeric': 0.16051136363636365, 'fraction_numerical': 0.015151515151515152, 'mean_word_length': 2.7867383512544803, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1981550', 'n_tokens_mistral': 735, 'n_tokens_neox': 698, 'n_words': 163}