Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
a4fd1efd
Commit
a4fd1efd
authored
Jul 02, 2021
by
Gabriel-31415
Browse files
ajuste no hearders
parent
c9ec1e3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
a4fd1efd
...
@@ -615,12 +615,32 @@ class TrabalhoController extends Controller
...
@@ -615,12 +615,32 @@ class TrabalhoController extends Controller
if
(
Storage
::
disk
()
->
exists
(
$projeto
->
anexoPlanilhaPontuacao
))
{
if
(
Storage
::
disk
()
->
exists
(
$projeto
->
anexoPlanilhaPontuacao
))
{
ob_end_clean
();
ob_end_clean
();
$file
=
$projeto
->
anexoPlanilhaPontuacao
;
$ext
=
explode
(
"."
,
$file
);
// dd($ext);
switch
(
$ext
[
1
])
{
case
'xlsx'
:
$hearder
=
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
;
break
;
case
'xls'
:
$hearder
=
'application/vnd.ms-excel'
;
break
;
case
'ods'
:
$hearder
=
'application/vnd.oasis.opendocument.spreadsheet'
;
break
;
default
:
$hearder
=
'application/vnd.ms-excel'
;
break
;
}
$headers
=
array
(
$headers
=
array
(
'
Content-type:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
,
"
Content-type:
{
$hearder
}
"
,
);
);
return
Storage
::
download
(
$projeto
->
anexoPlanilhaPontuacao
,
null
,
$headers
);
return
Storage
::
download
(
$projeto
->
anexoPlanilhaPontuacao
,
"Planilha.
{
$ext
[
1
]
}
"
,
$headers
);
}
}
return
abort
(
404
);
return
abort
(
404
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment