Have you tried manually setting the file name?
May 26, 2017
5
Level 1
Uploaded SVG files stored as HTML?
Hi there,
I have a simple controller with the following code:
if ($request->hasFile('file')) {
$path = $request->file->store('images');
}
When I upload a SVG file, $path contains a .html file and the file is indeed stored as .html on the server. I have no middleware.
Here's a snippet of the request (the mime-type looks good to me):
------WebKitFormBoundarywRanlLzAku4jBaQO
Content-Disposition: form-data; name="file"; filename="bubbles.svg"
Content-Type: image/svg+xml
------WebKitFormBoundarywRanlLzAku4jBaQO--
Thanks.
Please or to participate in this conversation.