MCPcopy Create free account
hub / github.com/diffgram/diffgram / upload_limits

Method upload_limits

walrus/methods/input/upload.py:243–259  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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,

Callers 1

create_inputMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected