diff --git a/prusa/link/web/files.py b/prusa/link/web/files.py index 1f4e4ac4..1be7aa79 100644 --- a/prusa/link/web/files.py +++ b/prusa/link/web/files.py @@ -11,6 +11,7 @@ from poorwsgi.response import JSONResponse, Response from prusa.connect.printer.const import ( + Event, FileType, Source, StorageType, @@ -256,6 +257,12 @@ def file_upload(req, storage, path): temp.flush() fsync(temp.fileno()) + event_cb = app.daemon.prusa_link.printer.event_cb + event_cb(Event.TRANSFER_FINISHED, + Source.WUI, + destination=transfer.path, + transfer_id=transfer.transfer_id) + transfer.type = TransferType.NO_TRANSFER if req.content_length > uploaded: