Skip to content
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

use path.posix.join() to avoid issues with OS path separators that co… #135

Merged
merged 1 commit into from
Nov 24, 2021
Merged

use path.posix.join() to avoid issues with OS path separators that co… #135

merged 1 commit into from
Nov 24, 2021

Conversation

BenMenking
Copy link

On the Windows platform using Cygwin64, path.join() appears to use the Windows path separator ('') instead of the POSIX path separator which causes files in directories uploaded to AWS S3 to contain a backslash and become inaccessible. path.posix.join() appears to use the correct path separator for AWS S3.

Example of issue

serverless.yml config:

    assets:
      '/js/*': assets/js

aws s3 ls <bucket> listing:

2021-11-18 15:29:18      50205 js\analytics.js
2021-11-18 15:29:18       8233 js\bootstrap-datepicker.min.js
2021-11-18 15:29:19      36399 js\bootstrap.min.js

After code changes, aws s3 ls <bucket>:

                           PRE js/

And aws s3 ls <bucket>/js/:

2021-11-18 20:57:23      50205 analytics.js
2021-11-18 20:57:23       8233 bootstrap-datepicker.min.js
2021-11-18 20:57:23      36399 bootstrap.min.js

hth, use as needed

@mnapoli
Copy link
Member

mnapoli commented Nov 24, 2021

Thank you!

@mnapoli mnapoli merged commit f1adafa into getlift:master Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants