Support » Fixing WordPress » Media Library: Error Saving Media Attachment

  • Resolved MITJack


    I am trying to upload the new versions of Outlook vCards into the Media Library, but get an error, “Error Saving Media Attachment.”

    One support page I found said to make sure “Store uploads in this folder” is set to “wp-content/uploads,” but that setting is already correct.

    The uploader is working, as I am able to add photos to the library.

    We are on WordPress 2.9.1.

    Any ideas on why the vCards will not save?

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi


    Forum Moderator

    The file format type may not be acceptable.

    ESMI: Thanks for the reply. The original webmaster had added vCards to the library and added them to pages successfully, so vCards should work. I was unable to edit the original vCards or I would have simply done that.



    Forum Moderator

    You said these were new versions, yes? Are the file formats & prefixes identical to the previously uploaded vCards?

    This is interesting. I just checked. The original files did have the standard .vcf extension. I did notice that he was using shorter names without any spaces.

    I modified one of my filenames to be shorter. I tried to upload it, but this time got a different error:

    “File type does not meet security guidelines. Try another.”

    Now I am getting that error when I try to load other vCards.



    Forum Moderator

    Sounds like the vCard mime type isn’t registered an an allowed type. Try adding the following to your theme’s functions.php:

    add_filter('upload_mimes', 'custom_upload_mimes');
    function custom_upload_mimes ( $existing_mimes=array() ) {
    	// add your extension to the array
    	$existing_mimes['vcf'] = 'text/x-vcard';
    	return $existing_mimes;

    Or have a look at

    Thank you! I look forward to trying this out later today.

    Esmi: Progress! I did add the pjw-mime-config plugin and have activated it. I am about to add an associated mime type, but am a little unclear on what I need to add. Clearly the file extension is vcf (no period needed apparently) What am I supposed to put for the associated mime type?

    Found out how to list the associated MIME type (thank you Google!). The vCards are uploading correctly now.

    Thank you Esmi. I have marked this as resolved.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Media Library: Error Saving Media Attachment’ is closed to new replies.