Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Castopod Host
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Späth
Castopod Host
Commits
35b5be09
Commit
35b5be09
authored
3 years ago
by
Benjamin Bellamy
Browse files
Options
Downloads
Patches
Plain Diff
fix(import-with-escaped-characters): remove \CodeIgniter\HTTP\URI in download_file, closes
#103
parent
15180d22
No related branches found
No related tags found
1 merge request
!1
WIP: German translation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/Helpers/media_helper.php
+2
-4
2 additions, 4 deletions
app/Helpers/media_helper.php
with
2 additions
and
4 deletions
app/Helpers/media_helper.php
+
2
−
4
View file @
35b5be09
...
...
@@ -45,9 +45,8 @@ function download_file($fileUrl)
var_dump
(
$fileUrl
);
$client
=
\Config\Services
::
curlrequest
();
$uri
=
new
\CodeIgniter\HTTP\URI
(
$fileUrl
);
$response
=
$client
->
get
(
$
uri
,
[
$response
=
$client
->
get
(
$
fileUrl
,
[
'headers'
=>
[
'User-Agent'
=>
'Castopod/'
.
CP_VERSION
,
],
...
...
@@ -72,8 +71,7 @@ function download_file($fileUrl)
$newFileUrl
=
(
string
)
trim
(
$response
->
getHeader
(
'location'
)
->
getValue
(),
);
$newLocation
=
new
\CodeIgniter\HTTP\URI
(
$newFileUrl
);
$response
=
$client
->
get
(
$newLocation
,
[
$response
=
$client
->
get
(
$newFileUrl
,
[
'headers'
=>
[
'User-Agent'
=>
'Castopod/'
.
CP_VERSION
,
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment