@@ -902,6 +902,34 @@ def share(self, path: str, adminproxyuserid: str = "") -> FCShare:
902902 str_to_bool (resp .findtext ("./share/allowpublicuploadonly" , "" )),
903903 )
904904
905+ def quickshare (self , sharelocation : str , adminproxyuserid : str = "" ) -> FCShare :
906+ """
907+ Quick Share 'sharelocation'
908+ """
909+ resp = self ._api_call (
910+ "/core/quickshare" ,
911+ {"sharelocation" : sharelocation , "adminproxyuserid" : adminproxyuserid },
912+ )
913+
914+ shareid = resp .findtext ("./share/shareid" , "" )
915+
916+ if not shareid :
917+ msg = resp .findtext ("./meta/message" , "" )
918+ if msg :
919+ raise ServerError ("" , msg )
920+ else :
921+ raise ServerError ("" , "No shareid in response" )
922+
923+ return FCShare (
924+ shareid ,
925+ resp .findtext ("./share/sharename" , "" ),
926+ resp .findtext ("./share/sharelocation" , "" ),
927+ str_to_bool (resp .findtext ("./share/allowpublicaccess" , "" )),
928+ str_to_bool (resp .findtext ("./share/allowpublicupload" , "" )),
929+ str_to_bool (resp .findtext ("./share/allowpublicviewonly" , "" )),
930+ str_to_bool (resp .findtext ("./share/allowpublicuploadonly" , "" )),
931+ )
932+
905933 def getshareforpath (self , path : str , adminproxyuserid : str = "" ) -> FCShare :
906934 """
907935 Share 'path'
0 commit comments