WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Media Library: Error Saving Media Attachment (9 posts)

  1. MITJack
    Member
    Posted 3 years ago #

    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?

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    The file format type may not be acceptable.

  3. MITJack
    Member
    Posted 3 years ago #

    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.

  4. esmi
    Forum Moderator
    Posted 3 years ago #

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

  5. MITJack
    Member
    Posted 3 years ago #

    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.

  6. esmi
    Forum Moderator
    Posted 3 years ago #

    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 http://wordpress.org/extend/plugins/pjw-mime-config/

  7. MITJack
    Member
    Posted 3 years ago #

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

  8. MITJack
    Member
    Posted 3 years ago #

    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?

  9. MITJack
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic