fix getUploadDir(), getPrimaryKey()