Mime Validation for STL #46988
              
                Unanswered
              
          
                  
                    
                      falconsmilie
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi.
I have a problem with mime validation. The application attempts to validate against uploaded 3D model file types with the following rule:
'mimes:step,stp,amt,stl'Using this rule allows
step,amt, andstpto be uploaded, but will not allowstl.In the laravel 10 documentation it links to a file where "a full listing of MIME types and their corresponding extensions" are listed.
None of the above types, which pass validation, are listed on that page.
stlis listed, but with thevnd.ms-pki.stlmime type and not the model/stl mime type.The following rule also fails validation;
'mimetypes:model/stl'On upload, In
\Illuminate\Validation\ValidationData::initializeAndGatherDatathe $data variable's mime type is returned asmodel/stl.At the same time, on upload,
vendor/laravel/framework/src/Illuminate/Validation/Validatorconstruct also returnsmodel/stl.Once submitted the uploaded file is then returned as
application/octet-stream.Is there a way to validate STL file types with the mimes rule?
Beta Was this translation helpful? Give feedback.
All reactions