@garcia05mg I think MIME types don’t have any spaces between each portion, so shouldn’t the above instead be:
function allowed_mime_types ( $types ) {
$types['svg'] = 'image/svg+xml';
$types['svgz'] = 'image/svg+xml';
$types['doc'] = 'application/msword';
$types['json'] = 'application/json';
return $types;
}
Although if this is just a formatting issue when posting you can disregard this comment.
Even with that change however, you might still run into the same issue I am having. In the most recent update, the function
‘wp_update_attachment_metadata’
aborts attempting to upload files to s3 if no additional resized images are generated when it makes this check (on line 1064 in ‘classes/amazon-s3-and-cloudfront.php’):
// Protect against updates of partially formed metadata.
if ( wp_attachment_is_image( $post_id ) && empty( $data['sizes'] ) ) {
return $data;
}
You could probably try replacing the above code (again, at line 1064 in ‘classes/amazon-s3-and-cloudfront.php’) with something like this:
// Protect against updates of partially formed metadata.
$mime_type = get_post_mime_type( $post_id );
if ( wp_attachment_is_image( $post_id ) && empty( $data['sizes'] ) && $mime_type != "image/svg+xml" ) {
return $data;
}
and see if you can upload svg files then.