def     postraw(self, sourceObject, targetPath, rename=None, mimetype='auto', mtime=None, egress_policy='COMPLETE', mkdir=False, callback=None, debug=True):
		if debug:
			logger.info( self.uid+" "+self.token+", post "+sourceObject+" "+targetPath+", rename="+str(rename)+", mimetype="+str(mimetype)+", mtime="+str(mtime)+", egress="+str(egress_policy)+", mkdir="+str(mkdir))
                	if (not os.path.isfile(sourceObject)): logger.info( "local("+sourceObject+") does not exist") ; return False
                	#dexists is not a thread safe call.  If your calling with multiple threads set debug=False, not only is it safe, it's faster
			if (not self.dexists(targetPath)): logger.info( "remote("+targetPath+") does not exist") ; return False

                sourcePath = os.path.dirname(sourceObject)
                sourceName = os.path.basename(sourceObject)
                # self.pbarfname = sourceName
                headers = []
                headers.append(str("X-Agile-Authorization: %s" % (str(self.token))))
                headers.append(str("X-Content-Type: %s" % (mimetype)))
                headers.append(str("X-Agile-Basename: %s" % (str(sourceName))))
                headers.append(str("X-Agile-Directory: %s" % (str(targetPath))))

                total_filesize = os.stat(sourceObject).st_size

                c = pycurl.Curl()
                c.setopt(c.URL, self.postrawurl)
                #c.setopt(c.NOPROGRESS, 0)
                #c.setopt(c.PROGRESSFUNCTION, lambda *args: progress(bar, total_filesize, *args))
                #c.setopt(c.HEADER, 1)
                c.setopt(c.HTTPHEADER, headers)
                c.setopt(c.UPLOAD, 1)
                c.setopt(c.READFUNCTION, open(sourceObject, 'rb').read)
                c.setopt(c.INFILESIZE_LARGE, total_filesize)
                c.setopt(c.CUSTOMREQUEST, "POST")
                c.setopt(c.VERBOSE, False)
                c.setopt(c.SSL_VERIFYHOST, False)
                c.setopt(c.SSL_VERIFYPEER, False)
                c.perform()
dataset/ETHPy150Open wylieswanson/AgileCLU/AgileCLU/__init__.py/AgileCLU.postraw/original