GithubHelp home page GithubHelp logo

Comments (5)

k1LoW avatar k1LoW commented on June 28, 2024 3

@Horgix sorry for too late repry 🙏

localPath is good idea !

I think

  • create localPath that allow dir and single files.
  • show deprecation message if using localDir

from serverless-s3-sync.

cmjchrisjones avatar cmjchrisjones commented on June 28, 2024 1

@k1LoW @Horgix I've just found myself needing this very feature, it looks like this might have been forgotten about over the last couple of years, is there any chance of seeing this come to fruition at all or if not would you be willing to share your amendments and/or publish a forked version of it @Horgix

Regards

Chris

from serverless-s3-sync.

programmer04 avatar programmer04 commented on June 28, 2024

Howdy @Horgix @k1LoW
What is the status of this issue? This feature will be useful also for me ;) Could @Horgix send this PR? I think localDir can be reused for single files too (only mention this in docs).

from serverless-s3-sync.

cmjchrisjones avatar cmjchrisjones commented on June 28, 2024

In the meantime a workaround that I have found is thus:

given I only want to sync a single file (in my case index.html), move it into a src folder

in the serverless.yml file, update the custom section and the WebsiteConfiguration.IndexDocument like so:

custom:
  siteName: <your-site-name>
  s3Sync:
    - bucketName: ${self:custom.siteName}
      localDir: src/

resources:
  Resources:
    StaticSite:
      Type: AWS::S3::Bucket
      Properties:
        AccessControl: PublicRead
        BucketName: ${self:custom.siteName}
        WebsiteConfiguration:
          IndexDocument: ./src/index.html

from serverless-s3-sync.

msudgh avatar msudgh commented on June 28, 2024

Hey @k1LoW,
I investigated the feature, and IMO requires a recursive implementation on the given path.
I want to utilize it as a plugin to upload a single file or directory.
It needs to detect the type of given path and consider the process to perform.

Appreciate any thoughts or input.

from serverless-s3-sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.