MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / clearUploads

Function clearUploads

src/astroprint/api/settings.py:665–674  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

663@api.route("/settings/software/storage/uploads", methods=['DELETE'])
664@restricted_access
665def clearUploads():
666 s = settings()
667
668 try:
669 emptyFolder(s.get(['folder', 'uploads']) or s.getBaseFolder('uploads'))
670 return jsonify()
671 except Exception, e:
672 logger = logging.getLogger(__name__)
673 logger.info(e, exc_info= True)
674 return ("There was an error trying to clear your uploads.", 500)
675
676@api.route("/settings/software/system-info", methods=['GET'])
677@restricted_access

Callers

nothing calls this directly

Calls 4

settingsFunction · 0.90
emptyFolderFunction · 0.85
getMethod · 0.45
getBaseFolderMethod · 0.45

Tested by

no test coverage detected