Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello Veraapoes,

    Thank you for your message. It is likely that your wordpress/hosting provided is not accepting the file type. You may want to check out adding some documentation about adding file types to wordpress itself: https://www.wpbeginner.com/wp-tutorials/how-to-add-additional-file-types-to-be-uploaded-in-wordpress/

    Thanks,
    Joseph
    VFBPro Support

    Thread Starter veraapoes

    (@veraapoes)

    Omg thanks! That was so damn easy!

    If someone is having this same problem, this is the code for gpx files to be added to the function-file from your theme.

    function add_upload_mime_types( $mimes ) {
        if ( function_exists( 'current_user_can' ) )
            $unfiltered = $user ? user_can( $user, 'unfiltered_html' ) : current_user_can( 'unfiltered_html' );
        if ( !empty( $unfiltered ) ) {
            $mimes['gpx'] = 'application/gpx+xml';
        }
        return $mimes;
    }
    add_filter( 'upload_mimes', 'add_upload_mime_types' );

    Our pleasure, glad we could help! You might check out our Pro version if your needs increase. ?? Have a good one.

    Thread Starter veraapoes

    (@veraapoes)

    Ok, i thought it was solved. But this only works when i’m logged in onto my wordpress. It’s weird cuz when i log out and fill in the stuff. The normal things like text and email and numbers does come through. But the file upload doesn’t come through?

    Any ideas ? :/

    If it only works when you are logged in, my guess is that it is a permissions issue now. I’d suggest making sure that guest permissions would be set in a way to allow users to upload this file type. You might want to consult with your website host on the matter. Explain it just as you have explained it to me here.

    Thread Starter veraapoes

    (@veraapoes)

    function my_myme_types($mime_types){
    $mime_types['gpx'] = 'map/gpx'; //Adding gpx extension
    return $mime_types;
    }
    
    add_filter('upload_mimes', 'my_myme_types', 1, 1);

    So the code above it the correct one. The one i found earlier didn’t do its job. ??

    So glad you were able to sort this out! Yeah it is more of a WordPress thing, because VFBPro pretty much allows any specified type.

    Thanks,
    Joseph
    VFBPro Support

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘File upload not giving me file’ is closed to new replies.