def UploadRaw(file_path, aff4_path, token=None):
 full_path = rdfvalue.RDFURN(aff4_path).Add(os.path.basename(file_path))
 fd = aff4.FACTORY.Create(full_path, 'AFF4Image', mode='w', token=token)
 fd.Write(open(file_path, 'rb').read(((1024 * 1024) * 30)))
 fd.Close()
 return str(fd.urn)

def UploadRaw ( file_path , aff4_path , token = None ) : full_path = rdfvalue . RDFURN ( aff4_path ) . Add ( os . path . basename ( file_path ) ) fd = aff4 . FACTORY . Create ( full_path , 'AFF4Image' , mode = 'w' , token = token ) fd . Write ( open ( file_path , 'rb' ) . read ( ( ( 1024 * 1024 ) * 30 ) ) ) fd . Close ( ) return str ( fd . urn )
upload a file to the datastore .