It is done via firewall filters:
set firewall policer shape if-exceeding bandwidth-limit 3m
set firewall policer shape if-exceeding burst-size-limit 300k
set firewall policer shape then discard
set firewall filter limit_download term shaping from destination-address 10.1.0.0/16
set firewall filter limit_download term shaping then policer shape
set firewall filter limit_download term shaping then accept
set firewall filter limit_download term all_other_traffic then accept
set firewall filter limit_upload term shaping from source-address 10.1.0.0/16
set firewall filter limit_upload term shaping then policer shape
set firewall filter limit_upload term shaping then accept
set firewall filter limit_upload term all_other_traffic then accept
set interfaces <lan interface> unit 0 family inet filter input limit_upload
set interfaces <lan interface> unit 0 family inet filter output limit_download
you can use different policers for upload and download.
Also you can use these filters on external interface only then you need to swap input and output.
Hope this will help for you:)