sonata-project / SonataMediaBundle

Symfony SonataMediaBundle
https://docs.sonata-project.org/projects/SonataMediaBundle
MIT License
451 stars 495 forks source link

Files .cdr saved as .bin or .zip #1481

Closed ostbender closed 4 years ago

ostbender commented 6 years ago

Environment

Sonata packages

sonata-project/admin-bundle              3.32.0 3.40.2 The missing Symfony Admin Generator
sonata-project/block-bundle              3.12.1 3.12.1 Symfony SonataBlockBundle
sonata-project/cache                     2.0.1  2.0.1  Cache library
sonata-project/classification-bundle     3.7.1  3.7.1  Symfony SonataClassificationBundle
sonata-project/core-bundle               3.11.2 3.11.2 Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.3.1  2.4.0  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.1.0  1.1.0  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.6.2  3.6.2  Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/easy-extends-bundle       2.5.0  2.5.0  Symfony SonataEasyExtendsBundle
sonata-project/exporter                  1.9.1  1.9.1  Lightweight Exporter library
sonata-project/formatter-bundle          3.4.1  4.1.2  Symfony SonataFormatterBundle
sonata-project/google-authenticator      2.2.0  2.2.0  Library to integrate Google Authenticator into a PHP project
sonata-project/intl-bundle               2.5.0  2.5.0  Symfony SonataIntlBundle
sonata-project/media-bundle              3.16.1 3.16.2 Symfony SonataMediaBundle
sonata-project/user-bundle               3.6.0  4.2.3  Symfony SonataUserBundle

Symfony packages

symfony/assetic-bundle     v2.8.2  v2.8.2 Integrates Assetic into Symfony2
symfony/monolog-bundle     v2.12.1 v3.3.0 Symfony MonologBundle
symfony/phpunit-bridge     v2.8.46 v4.1.6 Symfony PHPUnit Bridge
symfony/polyfill-apcu      v1.9.0  v1.9.0 Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-ctype     v1.9.0  v1.9.0 Symfony polyfill for ctype functions
symfony/polyfill-intl-icu  v1.9.0  v1.9.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring  v1.9.0  v1.9.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php54     v1.9.0  v1.9.0 Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions
symfony/polyfill-php55     v1.9.0  v1.9.0 Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions
symfony/polyfill-php56     v1.9.0  v1.9.0 Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70     v1.9.0  v1.9.0 Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util      v1.9.0  v1.9.0 Symfony utilities for portability of PHP codes
symfony/security-acl       v3.0.1  v3.0.1 Symfony Security Component - ACL (Access Control List)
symfony/swiftmailer-bundle v2.6.7  v3.2.3 Symfony SwiftmailerBundle
symfony/symfony            v2.8.46 v4.1.6 The Symfony PHP framework

PHP version

PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.10-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans

Subject

When adding a new cdr file, the sonata saves it with the zip or bin extension. Protect url for ROLE_ADMIN, ROLE_SUPER_ADMIN content correct file .cdr The "reference" for user content hash link like /uploads/media/default/0001/01/4d1d6cf5905bc8ffa1ea7ad1f66b08dd19c0260d.bin File mime tipe is application/octet-stream, but this .cdr How to make the extension does not change?

Steps to reproduce

In media admin upload .cdr file

Expected results

Need reference like 4d1d6cf5905bc8ffa1ea7ad1f66b08dd19c0260d.cdr

Actual results

4d1d6cf5905bc8ffa1ea7ad1f66b08dd19c0260d.bin or 4d1d6cf5905bc8ffa1ea7ad1f66b08dd19c0260d.zip

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.