To be able to upload something it's required to create target folder (once per field) and "/resized" subfolder under it and set proper write permissions on them. Then created folder name should be specified in corresponding field declaration in unit config. This is potential place for typing errors, because developer could:
- create one folder and then specify other folder name in unit config;
- forgot to create folder or set correct permissions when deploying site on production/development server.
This is why automatic folder creation could speed-up development. Buy applying proposed approach (patch) we could gain advantages mentioned below:
- eliminate potential error source;
- automate process and increment development efficiency.
Proposed patch is just a start for automatic folder creation. For example folder creation code could be moved to central place, like FileHelper and used, when needed.