Return a file object if this handler is activated.
(self, file_size)
| 236 | return raw_data |
| 237 | |
| 238 | def file_complete(self, file_size): |
| 239 | """Return a file object if this handler is activated.""" |
| 240 | if not self.activated: |
| 241 | return |
| 242 | |
| 243 | self.file.seek(0) |
| 244 | return InMemoryUploadedFile( |
| 245 | file=self.file, |
| 246 | field_name=self.field_name, |
| 247 | name=self.file_name, |
| 248 | content_type=self.content_type, |
| 249 | size=file_size, |
| 250 | charset=self.charset, |
| 251 | content_type_extra=self.content_type_extra, |
| 252 | ) |
| 253 | |
| 254 | |
| 255 | def load_handler(path, *args, **kwargs): |
nothing calls this directly
no test coverage detected