From c901ba52618b1dc8930aec036dd0f1e76119bd7c Mon Sep 17 00:00:00 2001 From: Ragnar Lothbrok <30740511+RagnarLothbrok-Odin@users.noreply.github.com> Date: Mon, 11 Dec 2023 11:12:27 +0000 Subject: [PATCH] :sparkles: feat(main.py): update headers to include upload options for API request --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 27b7973..8f05f95 100644 --- a/main.py +++ b/main.py @@ -17,6 +17,10 @@ USER_ACCESS_TOKEN = "" # The maximum allowable size for an individual file, specified in megabytes MAX_FILE_SIZE_MB = 40 +# A dictionary containing upload options for the Zipline API. +# For detailed information on available options, refer to the official documentation: +# https://zipline.diced.sh/docs/guides/upload-options +UPLOAD_OPTIONS = {"Format": "RANDOM", "Embed": "false"} def validate_file(path): @@ -82,7 +86,7 @@ def upload_file(self, event): if not self.handle_array(event): return - headers = {"Authorization": f"{USER_ACCESS_TOKEN}"} + headers = {"Authorization": USER_ACCESS_TOKEN, **UPLOAD_OPTIONS} files = { "file": ( basename(event.src_path),