Skip to content

Commit c901ba5

Browse files
✨ feat(main.py): update headers to include upload options for API request
1 parent c57a88d commit c901ba5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
USER_ACCESS_TOKEN = "<access_token>"
1818
# The maximum allowable size for an individual file, specified in megabytes
1919
MAX_FILE_SIZE_MB = 40
20+
# A dictionary containing upload options for the Zipline API.
21+
# For detailed information on available options, refer to the official documentation:
22+
# https://zipline.diced.sh/docs/guides/upload-options
23+
UPLOAD_OPTIONS = {"Format": "RANDOM", "Embed": "false"}
2024

2125

2226
def validate_file(path):
@@ -82,7 +86,7 @@ def upload_file(self, event):
8286
if not self.handle_array(event):
8387
return
8488

85-
headers = {"Authorization": f"{USER_ACCESS_TOKEN}"}
89+
headers = {"Authorization": USER_ACCESS_TOKEN, **UPLOAD_OPTIONS}
8690
files = {
8791
"file": (
8892
basename(event.src_path),

0 commit comments

Comments
 (0)