code: def convert_file_to_upload_string(i):
      
  
      import base64
  
      fn=i['filename']
  
      if not os.path.isfile(fn):
         return {'return':1, 'error':'file '+fn+' not found'}
  
      s=b''
      try:
         f=open(fn, 'rb')
         while True:
            x = f.read(32768);
            if not x: break
            s+=x
         f.close()
      except Exception as e:
         return {'return':1, 'error':'error reading file ('+format(e)+')'}
  
      s=base64.urlsafe_b64encode(s).decode('utf8')
  
      return {'return':0, 'file_content_base64': s}
docs: Input:  {
                filename - file name to convert
              }
  
      Output: {
                return              - return code =  0, if successful
                                                  >  0, if error
                (error)             - error text if return > 0
                file_content_base64 - string that can be transmitted through Internet
              }