• Resolved change3d

    (@change3d)


    Hi there!

    I made a form for my customers to send a request for quotation. Unfortunately it seems that 3D files like STL, STEP etc. are not allowed to be uploaded. Even though I have specified these file formats in text as stated.

    Here I found a solution which works for STL, but I cannot get the same thing work for STEP files.

    Thank you very much in advance!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @change3d

    I hope you are doing well today.

    I pinged our SLS Team to review this and see what they can do with previous snippet so it could also support STEP files. We will post an update here as soon as more information is available.

    Kind Regards,
    Kris

    Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi again

    Could you try this snippet:

    add_filter( 'upload_mimes', 'wpmudev_stl_gcode_add_upload_mime' );
    function wpmudev_stl_gcode_add_upload_mime( $mime_types ) {
        $mime_types['stl'] = 'application/sla';
        $file_types['stp'] = 'text/plain';
        return $mime_types;
    }

    Kind Regards,
    Kris

    Thread Starter change3d

    (@change3d)

    Hi Kris

    Thank you very much for your quick respones!
    Unfortunately it didn’t work. That’s what I already tried too…

    Kind Regards
    Markus

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @change3d ,

    Can you try changing text/plain to application/octet-stream?

    kind regards,
    Kasia

    Thread Starter change3d

    (@change3d)

    Hi Kasia

    I tried but it did not work. How ever I got it to work!
    I saw that other than the STL, which was with “$mime_types”, STEP was with “$file_types”.

    I then changed STEP also to “$mime_types”. Whith “application/octet-stream” it did not work but with “text/plain” it did!

    I don’t know if this really is the solution but for now it seems to work.

    BTW: For anyone how wants to enable 3MF files, this worked for me:
    $mime_types[‘3mf’] = ‘application/octet-stream’;

    Thank you for your help!

    Kind regards,
    Markus

    • This reply was modified 11 months, 2 weeks ago by change3d.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘3D file upload (STL, STEP etc) not allowed’ is closed to new replies.