Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
maarchRM
Commits
0677a536
Verified
Commit
0677a536
authored
Jun 17, 2022
by
Cyril Vazquez
Browse files
Get file handler for received files
parent
b4342f7d
Pipeline
#18842
failed with stages
in 28 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
core/Request/HttpRequest.php
View file @
0677a536
...
...
@@ -195,7 +195,11 @@ class HttpRequest
foreach
(
$_FILES
as
$name
=>
$item
)
{
// Standard form-data files at root level
if
(
is_string
(
$item
[
'name'
]))
{
$files
[
$name
]
=
$item
;
$file
=
$item
;
if
(
$file
[
'error'
]
==
0
)
{
$file
[
'handler'
]
=
fopen
(
$file
[
'tmp_name'
],
'r'
);
}
$files
[
$name
]
=
$file
;
continue
;
}
...
...
@@ -211,7 +215,11 @@ class HttpRequest
foreach
(
$keys
as
$key
)
{
$file
[
$key
]
=
$item
[
$key
][
$fname
];
}
if
(
$file
[
'error'
]
==
0
)
{
$file
[
'handler'
]
=
fopen
(
$file
[
'tmp_name'
],
'r'
);
}
$files
[
$name
][
$fname
]
=
$file
;
continue
;
}
...
...
@@ -222,6 +230,9 @@ class HttpRequest
foreach
(
$keys
as
$key
)
{
$file
[
$key
]
=
$item
[
$key
][
$fname
][
$index
];
}
if
(
$file
[
'error'
]
==
0
)
{
$file
[
'handler'
]
=
fopen
(
$file
[
'tmp_name'
],
'r'
);
}
$files
[
$name
][
$fname
][
$index
]
=
$file
;
}
}
...
...
Write
Preview
Supports
Markdown
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