-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assets Uploaded to S3 - Path has Backslash #134
Comments
Ok, I'm sad to say I'm running node.js on Windows using Cygwin64. So guess which separator is going to be used in path.join() ? Since S3 is going to use unix separators it may be prudent to use path.posix.join() instead. Going to close this issue. |
Hi @BenMenking, I ran into the same issue on the current version (1.11.0). I tried to search on the Lift source code, but I couldn't find where this is happening. Is this issue a problem on the Lift code, or in another lib dependency? |
@eduardo-veras A PR to fix was submitted on Nov 24, '21 and was accepted but 1.11.0 looks to be built on Nov 2nd, '21 so it won't include that fix. You could pull the latest and try that. |
Thanks @BenMenking! |
It appears that for any assets in subdirectories uploaded to S3, it uses a backslash instead of a forward slash. This appears to make the file(s) inaccessible. Here is the snippet I'm using in serverless.yml:
Here's a sample of those files as they appear in S3 (retrieved via
aws s3 ls <bucket>
; displays same way in AWS console):Attempting to access one of those files (https://xxxxxxxx.yyy/images/logo4.png) via CloudFront results in:
I checked the CloudFront Behaviors section and they look correct.
If I manually delete the files in S3, create the containing directory and upload the file manually, it works as expected.
Has anyone else run into this?
The text was updated successfully, but these errors were encountered: