miarra / fileserver
Miarra:基于Nette框架的文件服务器
v3.0.1
2022-02-16 23:21 UTC
Requires
- php: >= 8.0
- latte/latte: ^2.5
- nette/application: ^3.1
- nette/bootstrap: ^3.0
- nette/caching: ^3.0
- nette/database: ^3.0
- nette/di: ^3.0
- nette/finder: ^2.5
- nette/forms: ^3.0
- nette/http: ^3.0
- nette/mail: ^3.0
- nette/robot-loader: ^3.0
- nette/security: ^3.0
- nette/utils: ^3.2
- tracy/tracy: ^2.6
Requires (Dev)
- mockery/mockery: ^1.4
- nette/tester: ^2.4
- orisai/coding-standard: ^2.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-nette: ^0.12.21
- symfony/thanks: ^1
This package is auto-updated.
Last update: 2024-09-17 04:47:53 UTC
README
此应用程序为其他应用程序存储图像。
设置
您必须在本地配置文件中设置选项,如下所示
parametres:
username: 'username'
password: 'password'
cacheTime: '2 minutes'
建议像这样设置虚拟主机(针对Apache2)
<VirtualHost *:80>
# informations about webmaster showed in case that web crasched
ServerAdmin name@mail.foo
# domain to aply rules
ServerName domain.bar
# set document root
DocumentRoot /path/to/document/root
# default setting for document root
<Directory "/path/to/document/root/">
AllowOverride All
Order Allow,Deny
Allow from all
Require all granted
#is recommended to use XSendFile
<IfModule mod_xsendfile.c>
<Files *.php>
XSendFile On
XSendFilePath /path/to/images/folder/
</Files>
</IfModule>
#MOD_X_SENDFILE_ENABLED will be 1 if XSendFile is enabled, 0 otherwise
SetEnv MOD_X_SENDFILE_ENABLED 0
</Directory>
</VirtualHost>
文件夹 log
、temp
和 images
必须有写权限。
保存和加载文件/图像
对于保存、加载和删除图像,请使用 miarra/filemanipulator
,您可以在 Packagist(https://packagist.org.cn/packages/miarra/filemanipulator
)或 Bitbucket(https://bitbucket.org/miarra/filemanipulator.git
)上找到它。
安全
所有文件只能通过指定的URL访问。不允许直接访问。
如果您不使用PROXY,您需要将返回的URL与您的文件服务器URL和服务器图像文件夹连接起来
(示例:'https://< yourFileServerURL.xy >/images/< yourReturnedURL >').
仅使用 Https 协议。
结论
此应用程序使用 PHP 8.0 和 Nette 3.1 运行,并属于 Miarra © 2021