def put( self, path_or_tuple, folder_id='<STR_LIT>',<EOL>overwrite=None, downsize=None, bits_api_fallback=True ):
api_overwrite = self._translate_api_flag(overwrite, '<STR_LIT>', ['<STR_LIT>'])<EOL>api_downsize = self._translate_api_flag(downsize, '<STR_LIT>')<EOL>name, src = self._process_upload_source(path_or_tuple)<EOL>if not isinstance(bits_api_fallback, (int, float, long)):<EOL><INDENT>bits_api_fallback = bool(bits_api_fallback)<EOL><DEDENT>if bits_api_fallback is not False:<EOL><INDENT>if bits_api_fallback is True: bits_api_fallback = self.api_put_max_bytes<EOL>src.seek(<NUM_LIT:0>, os.SEEK_END)<EOL>if src.tell() >= bits_api_fallback:<EOL><INDENT>if bits_api_fallback > <NUM_LIT:0>: <EOL><INDENT>log.info(<EOL>'<STR_LIT>',<EOL>*((float(v) / <NUM_LIT:2>**<NUM_LIT:20>) for v in [src.tell(), bits_api_fallback]) )<EOL><DEDENT>if overwrite is not None and api_overwrite != '<STR_LIT:true>':<EOL><INDENT>raise NoAPISupportError( '<STR_LIT>'<EOL>'<STR_LIT>'.format(overwrite) )<EOL><DEDENT>if downsize is not None:<EOL><INDENT>log.info( '<STR_LIT>'<EOL>'<STR_LIT>', downsize )<EOL><DEDENT>file_id = self.put_bits(path_or_tuple, folder_id=folder_id) <EOL>return self.info(file_id)<EOL><DEDENT><DEDENT>return self( self._api_url_join(folder_id, '<STR_LIT>', name),<EOL>dict(overwrite=api_overwrite, downsize_photo_uploads=api_downsize),<EOL>data=src, method='<STR_LIT>', auth_header=True )<EOL>
Upload a file (object), possibly overwriting (default behavior)
                        a file with the same "name" attribute, if it exists.

                First argument can be either path to a local file or tuple
                        of "(name, file)", where "file" can be either a file-like object
                        or just a string of bytes.

                overwrite option can be set to False to allow two identically-named
                        files or "ChooseNewName" to let OneDrive derive some similar
                        unique name. Behavior of this option mimics underlying API.

                downsize is a true/false API flag, similar to overwrite.

                bits_api_fallback can be either True/False or an integer (number of
                        bytes), and determines whether method will fall back to using BITS API
                        (as implemented by "put_bits" method) for large files. Default "True"
                        (bool) value will use non-BITS file size limit (api_put_max_bytes, ~100 MiB)
                        as a fallback threshold, passing False will force using single-request uploads.