NEW YORK (CBSNewYork) — Mayor Bill de Blasio said late Sunday that action was being taken after Department of Sanitation workers were caught on video throwing away food.

Boxes upon boxes of fruits and vegetables from a sidewalk produce stand near the Williamsburg Bridge were tossed into a garbage truck recently.

READ MORE: Mayor De Blasio Unveils Extreme Weather Plan To Avoid Death And Destruction Of Ida During Future Storms

The NYPD said the vendor was warned several times about blocking the sidewalk, but refused to fix the problem.

READ MORE: New York City's Vaccine Mandate Could Impact Nets Season, As Irving Reportedly Not Getting Shot

But Mayor de Blasio said the produce should not have been thrown away.

“This makes no sense and cannot happen again,” the mayor said in a statement. “City Hall is right now in the process of instructing all city agencies to donate, not destroy, usable food confiscated as part of an enforcement action. Further, they will compost any food products that aren’t edible. Anything short of this is senseless.”

MORE NEWS: Some Health Care Workers Still Defiant As New York State Vaccine Mandate Takes Effect

But the NYPD said they are not allowed to give away food due to possible health risks.