Mercurial > libervia-backend
comparison sat/plugins/plugin_xep_0363.py @ 3223:163014f09bf4
plugin attach: handle large images resizing:
if `C.MESS_KEY_ATTACHMENTS_RESIZE` flag is set for an attachment, it will be checked, and
if it is a large image, a resized copy will be uploaded.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 22 Mar 2020 14:04:16 +0100 |
parents | 2ba602aef90e |
children | 9057713ab124 |
comparison
equal
deleted
inserted
replaced
3222:653fa213d2f8 | 3223:163014f09bf4 |
---|---|
203 | 203 |
204 @param sat_file(SatFile): file used for the upload | 204 @param sat_file(SatFile): file used for the upload |
205 should be closed, but it is needed to send the progressFinished signal | 205 should be closed, but it is needed to send the progressFinished signal |
206 @param slot(Slot): put/get urls | 206 @param slot(Slot): put/get urls |
207 """ | 207 """ |
208 log.info("HTTP upload finished") | 208 log.info(f"HTTP upload finished ({slot.get})") |
209 sat_file.progressFinished({"url": slot.get}) | 209 sat_file.progressFinished({"url": slot.get}) |
210 return slot.get | 210 return slot.get |
211 | 211 |
212 def _uploadEb(self, failure_, sat_file): | 212 def _uploadEb(self, failure_, sat_file): |
213 """Called on unsuccessful upload | 213 """Called on unsuccessful upload |