lib/filestack/utils/multipart_upload_utils.rb in filestack-2.9.1 vs lib/filestack/utils/multipart_upload_utils.rb in filestack-2.9.2

- old
+ new

@@ -1,9 +1,9 @@ require 'base64' require 'timeout' require 'digest' -require 'mimemagic' +require 'mini_mime' require 'json' require 'parallel' require 'typhoeus' require 'progress_bar' require 'filestack/config' @@ -14,10 +14,10 @@ # Includes all the utility functions for Filestack multipart uploads module MultipartUploadUtils def get_file_attributes(file, options = {}) filename = options[:filename] || File.basename(file) - mimetype = options[:mimetype] || MimeMagic.by_magic(File.open(file)) || FilestackConfig::DEFAULT_UPLOAD_MIMETYPE + mimetype = options[:mimetype] || MiniMime.lookup_by_filename(File.open(file)).content_type || FilestackConfig::DEFAULT_UPLOAD_MIMETYPE filesize = File.size(file) [filename, filesize, mimetype.to_s] end