decent icon indicating copy to clipboard operation
decent copied to clipboard

uploads/ directory is not created automatically

Open bates64 opened this issue 7 years ago • 4 comments

I can't upload files to a decent 80 db/ instance unless I run mkdir -p db/uploads/ first. Oops!

bates64 avatar Feb 26 '18 15:02 bates64

Ah right thanks for filing an issue for this! I've meant to for a while.

For what it's worth, I think it makes sense to create the uploads directory, but not its parent db directory (which is passed through $ decent CLI args).

towerofnix avatar Feb 26 '18 15:02 towerofnix

not its parent

And throw directory not found: db/?

bates64 avatar Feb 26 '18 16:02 bates64

@heyitsmeuralex Better to do a graceful crash: Database folder not found: (db path) (and then process.exit 1).

The main reason is so that if somebody accidentally does $ decent 80 db from the wrong directory, and then they're confused as to why the database is totally empty - they might think that, for some reason, their database was reset!

towerofnix avatar Feb 26 '18 17:02 towerofnix

graceful crash

@decent/cli should handle that. @decent/server should just throw an Error.

bates64 avatar Feb 26 '18 17:02 bates64