(self, file)
| 86 | return super(UiRequestPlugin, self).actionSiteMedia(path, **kwargs) |
| 87 | |
| 88 | def streamFile(self, file): |
| 89 | for i in range(100): # Read max 6MB |
| 90 | try: |
| 91 | block = file.read(60 * 1024) |
| 92 | if block: |
| 93 | yield block |
| 94 | else: |
| 95 | raise StopIteration |
| 96 | except StopIteration: |
| 97 | file.close() |
| 98 | break |
| 99 | |
| 100 | |
| 101 | @PluginManager.registerTo("SiteStorage") |
no test coverage detected