cakephp-file-storage | Abstract file storage and upload plugin | Cloud Storage library
kandi X-RAY | cakephp-file-storage Summary
kandi X-RAY | cakephp-file-storage Summary
[Code Quality] The File Storage plugin is giving you the possibility to upload and store files in virtually any kind of storage backend. The plugin features the [Gaufrette] and [FlySystem] library in a CakePHP fashion and provides a simple way to use the storage adapters through the [StorageManager] src/Storage/StorageManager.php) class. Storage adapters are an unified interface that allow you to store file data to your local file system, in memory, in a database or into a zip file and remote systems. There is a database table keeping track of what you stored where. You can always write your own adapter or extend and overload existing ones.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Gets the command options .
- Attach a file to the model .
- Get image url .
- Stores a file .
- Process an image .
- Setup the file storage .
- Create table schema .
- Returns a list of variant URLs .
- Display a fallback image .
- Configure file storage .
cakephp-file-storage Key Features
cakephp-file-storage Examples and Code Snippets
Community Discussions
Trending Discussions on cakephp-file-storage
QUESTION
CakePHP 3.4 application using the Burzum/FileStorage plugin (which uses KnpLabs/Gaufrette) to manage uploads to AWS S3. Unfortunately, I was running into the issue of MS Office files (docx, xlsx, etc) being detected as ZIP files.
I altered my code to use finfo first and if it detects zip, look at the extension to see if it maybe is an office file. Now I can pass this correct mimetype on to the file_storage table by doing a patchEntity. So far so good.
However, the FileStorage plugin calls KnpLabs/Gaufrette to actually send the file to S3, but it doesn't seem to send along the mimetype/contenttype. So Gaufrette then does its own little finfo trick in the AwsS3 Adapter, writing a metadata field 'Content-Type: application/zip' to the item on S3, causing the Office file to be downloaded as a zip file...
Is there any way to set the correct content type in the options of the AwsS3 adapter?
thanks!
...ANSWER
Answered 2018-Aug-24 at 09:06The answer was mentioned here: https://github.com/burzum/cakephp-file-storage/issues/36
It is possible accessing the adapter and setting, for instance, the Content Type using the following code:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cakephp-file-storage
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page