serverless-client-s3
serverless-client-s3 copied to clipboard
S3 Path issue
I had an asset folder with some other folders like css , img , etc. in it. When I deployed it created the asset folder in my S3 bucket but all the underlying folders were not created instead the files in them were named like css\example.css , img\example.jpg . I checked the code and it seems the line # 205 has a replace statement which is not covering the all occurrences of '' :
205: fileKey = filePath.replace(_this.clientPath, '').substr(1).replace('\', '/');
should be :
205: fileKey = filePath.replace(_this.clientPath, '').substr(1).replace(/\\/g, '/');