forked from IronBox/ironbox-client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIronBoxUploadFile.py
More file actions
37 lines (27 loc) · 993 Bytes
/
IronBoxUploadFile.py
File metadata and controls
37 lines (27 loc) · 993 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""
Demonstrates how to upload a file to
an IronBox secure package or container
Written by KevinLam@goironbox.com
Modified by motorific@gmail.com
Website: www.goironbox.com
"""
from IronBoxREST import IronBoxRESTClient
# ---------------------------------------------------
# Your IronBox authentication parameters, you could
# also pass these in as command arguments
# ---------------------------------------------------
ContainerID = 100777
IronBoxEmail = "email@email.com"
IronBoxPassword = "password123"
IronBoxAPIServerURL = "https://api.goironcloud.com/latest/"
IronBoxAPIVersion = "latest"
InFile = "test.txt"
IronBoxFileName = "testFileOnIronBox.txt"
def main():
# Create an instance of the IronBox REST class
IronBoxRESTObj = IronBoxRESTClient(
IronBoxEmail, IronBoxPassword, version=IronBoxAPIVersion, verbose=True
)
IronBoxRESTObj.upload_file_to_container(ContainerID, InFile, IronBoxFileName)
if __name__ == "__main__":
main()