A bracket device is adapted for mounting an object arranged on a slide rail assembly to a post of a rack. The bracket device includes a bracket and an engagement member. The bracket is connected to the slide rail assembly and has a longitudinal wall and an end wall substantially perpendicularly connected to the longitudinal wall. The end wall is mounted to the post of the rack by at least one mounting member. The engagement member is arranged on the bracket and releasably engaged with a portion of the object.