Download the PHP package goetas/multipart-upload-bundle without Composer
On this page you can find all versions of the php package goetas/multipart-upload-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download goetas/multipart-upload-bundle
More information about goetas/multipart-upload-bundle
Files in goetas/multipart-upload-bundle
Package multipart-upload-bundle
Short Description Goetas MultipartUploadBundle
License MIT
Informations about the package multipart-upload-bundle
GoetasMultipartUploadBundle
Symfony multipart/related
, multipart/alternative
and multipart/mixed
content type handler.
This bundle implements a subset of the https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html specifications
and allows you to deal with Content-Type: multipart/*;
requests with Symfony.
Install
Run composer require goetas/multipart-upload-bundle
Add bundle to symfony (if not using symfony/flex)
Request format
A multipart/related
request could look like this:
Usage
Controller
Body will not be decoded automatically, you can decode it by yourself or use FOSRestBundle to handle it transparently
Form Fields
Parts with form-data; name=
in Content-Disposition
part's headers
will be treated like an regular uploaded file.
Can be used with Symfony's form builder
Uploaded Files
Parts with form-data; name=
and filename=
in Content-Disposition
part's headers
will be treated like an regular uploaded file.
Can be used with Symfony's form builder
Attachment Files
Parts with attachment; filename=
in Content-Disposition
part's headers
will be treated as an attachment file.
Related Parts
Parts without a filename
will be treated as Riverline\MultiPartParser\StreamedPart
object.
Will be possible to access as well all the parts trough the related-parts
attribute.
-
Get part's headers
-
Get part's content
-
Get part's content as resource
- First part injected
By default, when a message is multipart/*
, the first part will become the Symfony message content.
You can disable this by setting first_part_as_default
to false
.
Configurations
Note
The code in this project is provided under the MIT license. For professional support contact [email protected] or visit https://www.goetas.com
All versions of multipart-upload-bundle with dependencies
symfony/http-foundation Version ^6.0|^7.0
symfony/http-kernel Version ^6.0|^7.0
symfony/dependency-injection Version ^6.0|^7.0
riverline/multipart-parser Version ^2.1