As said in PR description, Symfony only handles this as a validator. I can PR sf core alternatively.


David Buchmann <notifications@github.com> a écrit :

>> +                case UPLOAD_ERR_NO_FILE: 
>> +                    $message = "No file was uploaded"; 
>> +                    break; 
>> +                case UPLOAD_ERR_NO_TMP_DIR: 
>> +                    $message = "Missing a temporary folder"; 
>> +                    break; 
>> +                case UPLOAD_ERR_CANT_WRITE: 
>> +                    $message = "Failed to write file to disk"; 
>> +                    break; 
>> +                case UPLOAD_ERR_EXTENSION: 
>> +                    $message = "File upload stopped by extension"; 
>> +                    break; 
>> +                default: 
>> +                    $message = "Unknown upload error"; 
>> +                    break; 
>> +            }
>
>is this logic not already somewhere? how does core symfony report those
>error states? does it not already have translations for them?
>
>if we really need it, i propose an array of translation keys indexed by
>the error codes, to make things more compact. how does the dialog react
>to the exception? does the user see an error page with this message?
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/symfony-cmf/MediaBundle/pull/55/files#r6231235

-- 
Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.