2

Is it possible to upload cad files to a page created with laravel?

I have seen that in the MimeType class that they offer there is none of the extensions that interest me (STL, OBJ,FBX,DAE,3DS,IGES,STEP,VRML,X3D) and I have tried to use the known mimes (even if do not use the library) and it does not work.

UPDATE

To give more information, I'm trying to upload files with the extensions shown above. For example, for the stl type I am testing with stl and application/vnd.ms-pki.stl which are the ones that appear in the MimeTypeExtensionGuesser class of laravel.

The code is as follows:

{{Form::file('file_cad_maker', ['class' => 'input-file design-select','id' => 'input-file-cad', 'data-target' => '#input-file-cad-filename', 'data-parsley-max-file-size' => '64', 'data-parsley-allowed-format' => 'application/vnd.ms-pki.stl', 'data-parsley-trigger' => 'change focusout'])}}

But the client validation tells me that the file is not the type it should be (when I upload an stl file) and in the server-side, if I print the mime-type of the file it tells me: application/octet-stream, which it's used for files without extension.

Cristina V
  • 117
  • 7

1 Answers1

0

I know this is an old post but this worked for me when uploading autocad file (dwg) files.

'file' => 'mimetypes:application/octet-stream'
badz
  • 1