Fixed upload-time saving in database