@@ -187,21 +187,27 @@ private function addProvidersSection(ArrayNodeDefinition $node)
187
187
->scalarNode ('cdn ' )->defaultValue ('sonata.media.cdn.server ' )->end ()
188
188
->scalarNode ('generator ' )->defaultValue ('sonata.media.generator.default ' )->end ()
189
189
->scalarNode ('thumbnail ' )->defaultValue ('sonata.media.thumbnail.format ' )->end ()
190
- ->scalarNode ('allowed_extensions ' )->defaultValue (array (
191
- 'pdf ' , 'txt ' , 'rtf ' ,
192
- 'doc ' , 'docx ' , 'xls ' , 'xlsx ' , 'ppt ' , 'pptx ' ,
193
- 'odt ' , 'odg ' , 'odp ' , 'ods ' , 'odc ' , 'odf ' , 'odb ' ,
194
- 'csv ' ,
195
- 'xml ' ,
196
- ))->end ()
197
- ->scalarNode ('allowed_mime_types ' )->defaultValue (array (
198
- 'application/pdf ' , 'application/x-pdf ' , 'application/rtf ' , 'text/html ' , 'text/rtf ' , 'text/plain ' ,
199
- 'application/excel ' , 'application/msword ' , 'application/vnd.ms-excel ' , 'application/vnd.ms-powerpoint ' ,
200
- 'application/vnd.ms-powerpoint ' , 'application/vnd.oasis.opendocument.text ' , 'application/vnd.oasis.opendocument.graphics ' , 'application/vnd.oasis.opendocument.presentation ' , 'application/vnd.oasis.opendocument.spreadsheet ' , 'application/vnd.oasis.opendocument.chart ' , 'application/vnd.oasis.opendocument.formula ' , 'application/vnd.oasis.opendocument.database ' , 'application/vnd.oasis.opendocument.image ' ,
201
- 'text/comma-separated-values ' ,
202
- 'text/xml ' ,
203
- 'application/zip ' , // seems to be used for xlsx document ...
204
- ))->end ()
190
+ ->arrayNode ('allowed_extensions ' )
191
+ ->prototype ('scalar ' )->end ()
192
+ ->defaultValue (array (
193
+ 'pdf ' , 'txt ' , 'rtf ' ,
194
+ 'doc ' , 'docx ' , 'xls ' , 'xlsx ' , 'ppt ' , 'pttx ' ,
195
+ 'odt ' , 'odg ' , 'odp ' , 'ods ' , 'odc ' , 'odf ' , 'odb ' ,
196
+ 'csv ' ,
197
+ 'xml ' ,
198
+ ))
199
+ ->end ()
200
+ ->arrayNode ('allowed_mime_types ' )
201
+ ->prototype ('scalar ' )->end ()
202
+ ->defaultValue (array (
203
+ 'application/pdf ' , 'application/x-pdf ' , 'application/rtf ' , 'text/html ' , 'text/rtf ' , 'text/plain ' ,
204
+ 'application/excel ' , 'application/msword ' , 'application/vnd.ms-excel ' , 'application/vnd.ms-powerpoint ' ,
205
+ 'application/vnd.ms-powerpoint ' , 'application/vnd.oasis.opendocument.text ' , 'application/vnd.oasis.opendocument.graphics ' , 'application/vnd.oasis.opendocument.presentation ' , 'application/vnd.oasis.opendocument.spreadsheet ' , 'application/vnd.oasis.opendocument.chart ' , 'application/vnd.oasis.opendocument.formula ' , 'application/vnd.oasis.opendocument.database ' , 'application/vnd.oasis.opendocument.image ' ,
206
+ 'text/comma-separated-values ' ,
207
+ 'text/xml ' ,
208
+ 'application/zip ' , // seems to be used for xlsx document ...
209
+ ))
210
+ ->end ()
205
211
->end ()
206
212
->end ()
207
213
@@ -215,15 +221,19 @@ private function addProvidersSection(ArrayNodeDefinition $node)
215
221
->scalarNode ('generator ' )->defaultValue ('sonata.media.generator.default ' )->end ()
216
222
->scalarNode ('thumbnail ' )->defaultValue ('sonata.media.thumbnail.format ' )->end ()
217
223
->scalarNode ('adapter ' )->defaultValue ('sonata.media.adapter.image.gd ' )->end ()
218
- ->scalarNode ('allowed_extensions ' )->defaultValue (array (
219
- 'jpg ' , 'png '
220
- ))->end ()
221
- ->scalarNode ('allowed_mime_types ' )->defaultValue (array (
222
- 'image/pjpeg ' ,
223
- 'image/jpeg ' ,
224
- 'image/png ' ,
225
- 'image/x-png ' ,
226
- ))->end ()
224
+ ->arrayNode ('allowed_extensions ' )
225
+ ->prototype ('scalar ' )->end ()
226
+ ->defaultValue (array ('jpg ' , 'png ' ))
227
+ ->end ()
228
+ ->arrayNode ('allowed_mime_types ' )
229
+ ->prototype ('scalar ' )->end ()
230
+ ->defaultValue (array (
231
+ 'image/pjpeg ' ,
232
+ 'image/jpeg ' ,
233
+ 'image/png ' ,
234
+ 'image/x-png ' ,
235
+ ))
236
+ ->end ()
227
237
->end ()
228
238
->end ()
229
239
0 commit comments