File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ def get_upload_dir() -> Path:
147147).to (str )
148148
149149
150- def get_upload_url (file_path : str ) -> Var [str ]:
150+ def get_upload_url (file_path : str | Var [ str ] ) -> Var [str ]:
151151 """Get the URL of an uploaded file.
152152
153153 Args:
@@ -158,7 +158,7 @@ def get_upload_url(file_path: str) -> Var[str]:
158158 """
159159 Upload .is_used = True
160160
161- return uploaded_files_url_prefix + "/" + file_path
161+ return Var . create ( f" { uploaded_files_url_prefix } / { file_path } " )
162162
163163
164164def _on_drop_spec (files : Var ) -> Tuple [Var [Any ]]:
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ uploaded_files_url_prefix = Var(
3535 ),
3636).to (str )
3737
38- def get_upload_url (file_path : str ) -> Var [str ]: ...
38+ def get_upload_url (file_path : str | Var [ str ] ) -> Var [str ]: ...
3939
4040class UploadFilesProvider (Component ):
4141 @overload
You can’t perform that action at this time.
0 commit comments