Future could also get this from blob maybe since someone could fake drop zone thing... For now storing this as a status text thing... but could alternatively log as error and return
(input,
file_size,
file_size_limit: int = 5 * 1024 * 1024 * 1024)
| 241 | |
| 242 | @staticmethod |
| 243 | def upload_limits(input, |
| 244 | file_size, |
| 245 | file_size_limit: int = 5 * 1024 * 1024 * 1024): |
| 246 | """ |
| 247 | Future could also get this from blob maybe |
| 248 | since someone could fake drop zone thing... |
| 249 | |
| 250 | For now storing this as a status text thing... |
| 251 | but could alternatively log as error and return |
| 252 | |
| 253 | """ |
| 254 | |
| 255 | if file_size > file_size_limit: |
| 256 | input.status = "failed" |
| 257 | input.status_text = "Exceeded max file size" |
| 258 | |
| 259 | return input |
| 260 | |
| 261 | def create_input( |
| 262 | self, |