12345678 |
- def upload_file(self,bucket,bucketpath,filepath,ignoredates):
- s3connection = S3Connection(self.api,self.secret)
- s3bucket = s3connection.get_bucket(bucket)
- fullpath = os.path.relpath(os.path.abspath(filepath))
- filename = fullpath.split("/")[-1]
- bucketfile = "%s/%s" % (bucketpath,filename)
- bucketfile = re.sub("/%s$"%filename,"",bucketfile)
- self._upload_file(s3connection,s3bucket,fullpath,bucketfile,ignoredates)
|