Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
297
Merge Requests
42
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Backend - Engine
Commits
af223984
Commit
af223984
authored
3 hours ago
by
Guy Thouret
Browse files
Options
Download
(chore) Move File from Core to Helpers namespace -
#1120
parent
f8fddc82
fix/1120-thumbnail-oom
1 merge request
!397
WIP: Memory efficient method of getting Mime Types
Pipeline
#95622422
passed with stages
in 6 minutes and 56 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
11 deletions
+11
-11
Controllers/fs/v1/avatars.php
View file @
af223984
...
...
@@ -10,7 +10,7 @@ namespace Minds\Controllers\fs\v1;
use
Minds\Core
;
use
Minds\Entities
;
use
Minds\Interfaces
;
use
Minds\
Api\Factory
;
use
Minds\
Helpers\File
;
class
avatars
implements
Interfaces\FS
{
...
...
@@ -60,7 +60,7 @@ class avatars implements Interfaces\FS
}
if
(
!
empty
(
$contents
))
{
$mimetype
=
Core\
File
::
getMime
(
$contents
);
$mimetype
=
File
::
getMime
(
$contents
);
}
else
{
$mimetype
=
'image/jpeg'
;
}
...
...
This diff is collapsed.
Controllers/fs/v1/banners.php
View file @
af223984
...
...
@@ -10,7 +10,7 @@ namespace Minds\Controllers\fs\v1;
use
Minds\Core
;
use
Minds\Entities
;
use
Minds\Interfaces
;
use
Minds\
Api\Factory
;
use
Minds\
Helpers\File
;
class
banners
implements
Interfaces\FS
{
...
...
@@ -102,7 +102,7 @@ class banners implements Interfaces\FS
}
}
$mimetype
=
Core\
File
::
getMime
(
$content
);
$mimetype
=
File
::
getMime
(
$content
);
header
(
'Content-Type: '
.
$mimetype
);
header
(
'Expires: '
.
date
(
'r'
,
time
()
+
864000
));
...
...
This diff is collapsed.
Controllers/fs/v1/paywall.php
View file @
af223984
...
...
@@ -10,7 +10,7 @@ namespace Minds\Controllers\fs\v1;
use
Minds\Core
;
use
Minds\Entities
;
use
Minds\Interfaces
;
use
Minds\
Api\Factory
;
use
Minds\
Helpers\File
;
class
paywall
implements
Interfaces\FS
{
...
...
@@ -31,7 +31,7 @@ class paywall implements Interfaces\FS
$contents
=
file_get_contents
(
Core\Di\Di
::
_
()
->
get
(
'Config'
)
->
get
(
'path'
)
.
'engine/Assets/photos/andromeda-galaxy.jpg'
);
}
$mimetype
=
Core\
File
::
getMime
(
$contents
);
$mimetype
=
File
::
getMime
(
$contents
);
header
(
'Content-Type: '
.
$mimetype
);
header
(
'Expires: '
.
date
(
'r'
,
time
()
+
864000
));
header
(
"Pragma: public"
);
...
...
This diff is collapsed.
Controllers/fs/v1/thumbnail.php
View file @
af223984
...
...
@@ -6,9 +6,9 @@ namespace Minds\Controllers\fs\v1;
use
Minds\Core
;
use
Minds\Core\Di\Di
;
use
Minds\Entities
;
use
Minds\Interfaces
;
use
Minds\Core\Features\Manager
as
FeaturesManager
;
use
Minds\Helpers\File
;
class
thumbnail
extends
Core\page
implements
Interfaces\page
{
...
...
@@ -47,7 +47,7 @@ class thumbnail extends Core\page implements Interfaces\page
}
try
{
$contentType
=
Core\
File
::
getMime
(
$contents
);
$contentType
=
File
::
getMime
(
$contents
);
}
catch
(
\Exception
$e
)
{
error_log
(
$e
);
$contentType
=
'image/jpeg'
;
...
...
This diff is collapsed.
Core/Media/Proxy/Download.php
View file @
af223984
...
...
@@ -9,7 +9,7 @@
namespace
Minds\Core\Media\Proxy
;
use
Minds\Core\Di\Di
;
use
Minds\
Core
\File
;
use
Minds\
Helpers
\File
;
use
Minds\Core\Http\Curl\Client
;
use
Minds\Traits\MagicAttributes
;
...
...
This diff is collapsed.
Core/Storage/Services/S3.php
View file @
af223984
...
...
@@ -5,7 +5,7 @@ namespace Minds\Core\Storage\Services;
use
Aws\S3\S3Client
;
use
Minds\Core\Config
;
use
Minds\Core\Di\Di
;
use
Minds\
Core
\File
;
use
Minds\
Helpers
\File
;
class
S3
implements
ServiceInterface
{
...
...
This diff is collapsed.
Core
/File.php
→
Helpers
/File.php
View file @
af223984
<?php
namespace
Minds\
Core
;
namespace
Minds\
Helpers
;
class
File
{
...
...
This diff is collapsed.
Please
register
or
sign in
to comment