(self, input_file,
                    name, cid, cpw="", overwrite=True, resume=False,
                    query_resp_hook=None, reporthook=None)
return self.upload_by_resp(
            input_file=input_file, ftinitupload_resp=resp,
            reporthook=reporthook, fallbackhost=self.ts3conn.telnet_conn.host)
This is the recommended method to upload a file to a TS3 server.

        **name**, **cid**, **cpw**, **overwrite** and **resume** are the
        parameters for the TS3 query command **ftinitdownload**.
        The parameter **clientftid** is automatically created and unique for
        the whole runtime of the programm and the value of **size** is
        retrieved by the size of the **input_file**.

        **query_resp_hook**, if provided, is called, when the response of the
        ftinitupload query has been received. Its single parameter is the
        the response of the querry.

        For uploading the file to the server :meth:`upload` is called. So
        take a look at this method for further information.

        .. seealso::

            * :meth:`~commands.TS3Commands.ftinitupload`
            * :func:`~urllib.request.urlretrieve`
This is the recommended method to upload a file to a TS3 server.
This is the recommended method to upload a file to a TS3 server .
def init_upload(self, input_file,
                    name, cid, cpw="", overwrite=True, resume=False,
                    query_resp_hook=None, reporthook=None):
        """
        This is the recommended method to upload a file to a TS3 server.

        **name**, **cid**, **cpw**, **overwrite** and **resume** are the
        parameters for the TS3 query command **ftinitdownload**.
        The parameter **clientftid** is automatically created and unique for
        the whole runtime of the programm and the value of **size** is
        retrieved by the size of the **input_file**.

        **query_resp_hook**, if provided, is called, when the response of the
        ftinitupload query has been received. Its single parameter is the
        the response of the querry.

        For uploading the file to the server :meth:`upload` is called. So
        take a look at this method for further information.

        .. seealso::

            * :meth:`~commands.TS3Commands.ftinitupload`
            * :func:`~urllib.request.urlretrieve`
        """
        overwrite = "1" if overwrite else "0"
        resume = "1" if resume else "0"

        input_file.seek(0, 2)
        size = input_file.tell()

        ftid = self.get_ftid()

        resp = self.ts3conn.ftinitupload(
            clientftfid=ftid, name=name, cid=cid, cpw=cpw, size=size,
            overwrite=overwrite, resume=resume)

        if query_resp_hook is not None:
            query_resp_hook(resp)
        return self.upload_by_resp(
            input_file=input_file, ftinitupload_resp=resp,
            reporthook=reporthook, fallbackhost=self.ts3conn.telnet_conn.host)
def init_upload ( self , input_file , name , cid , cpw = "" , overwrite = True , resume = False , query_resp_hook = None , reporthook = None ) : overwrite = "1" if overwrite else "0" resume = "1" if resume else "0" input_file . seek ( 0 , 2 ) size = input_file . tell ( ) ftid = self . get_ftid ( ) resp = self . ts3conn . ftinitupload ( clientftfid = ftid , name = name , cid = cid , cpw = cpw , size = size , overwrite = overwrite , resume = resume ) if query_resp_hook is not None : query_resp_hook ( resp ) return self . upload_by_resp ( input_file = input_file , ftinitupload_resp = resp , reporthook = reporthook , fallbackhost = self . ts3conn . telnet_conn . host )