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: With Injuries Piling Up Across New York City, Mayor De Blasio Is Considering Bicycles Being Required To Have License Plates

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

READ MORE: Bronx Man Takes It Upon Himself To Clean Up NYC Park, But City Says Not So Fast

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: New York City Subways Resume 24-Hour Service

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