Made api/folder controller better
Anticipates errors in #upload