@@ -125,6 +125,18 @@ def upload_file_content(
125
125
filesize : int | None = None ,
126
126
delete_derived_files : bool = True ,
127
127
) -> None :
128
+ """
129
+ Uploads content to an existing file object in chunks using presigned URLs.
130
+ Handles aborting the upload if an error occurs.
131
+
132
+ Args:
133
+ file_object_id: The ID of the file object to upload to.
134
+ stream: A binary stream containing the file data.
135
+ persno: The user/person number who is uploading the file (default is user that triggered the Function).
136
+ check_access: Whether to check access permissions.
137
+ filesize: Size of the file in bytes (required only if the stream is not seekable).
138
+ delete_derived_files: Whether to delete derived files after upload.
139
+ """
128
140
persno = persno or self .metadata .app_user
129
141
if filesize is None :
130
142
filesize = self ._get_stream_size (stream )
@@ -167,6 +179,20 @@ def upload_new_file(
167
179
check_access : bool = True ,
168
180
filesize : int | None = None ,
169
181
) -> str :
182
+ """
183
+ Creates a new file attached to the parent object and uploads content from the provided stream.
184
+
185
+ Args:
186
+ parent_object_id: The ID of the parent object to attach the file to.
187
+ filename: The name of the new file.
188
+ stream: A binary stream containing the file data.
189
+ persno: The user/person number who is uploading the file (default is user that triggered the Function).
190
+ check_access: Whether to check access permissions.
191
+ filesize: Size of the file in bytes (required only if the stream is not seekable).
192
+
193
+ Returns:
194
+ The ID of the newly created file object.
195
+ """
170
196
persno = persno or self .metadata .app_user
171
197
file_object_id = self ._create_new_file (
172
198
filename = filename ,
0 commit comments