Should have been returning doc ID. Should fix trouble with uploads
Make sure resource ID is a number
Returning record ID instead and actually committing it to db
Merging with master