Code Monkey home page Code Monkey logo

Comments (6)

Martinsos avatar Martinsos commented on May 10, 2024 1

Example gist that @infomiho made, for uploading from client to server and then to S3 or to disk: https://gist.github.com/infomiho/ec379df4e33f3ae3410a251ba3aa81af . This is a minimal, "simplistic" version to start with.

I would normally though recommend uploading directly to S3 / ... from the client, and using server only to sign the upload URLs, so it would be good to also have instructions for that.

from open-saas.

vincanger avatar vincanger commented on May 10, 2024 1

file uploads are live and documented at https://docs.opensaas.sh/guides/file-uploading/

from open-saas.

vincanger avatar vincanger commented on May 10, 2024

I would normally though recommend uploading directly to S3 / ... from the client, and using server only to sign the upload URLs, so it would be good to also have instructions for that.

what do you think the best way to approach this is @Martinsos? I'm thinking of adding components and operations to the OpenSaaS template for uploading to S3, and then adding the example in the gist above to the docs as an alternative.

from open-saas.

Martinsos avatar Martinsos commented on May 10, 2024

@vincanger I think that sounds like a good idea. The main PITA with the S3 approach is of course, configuring stuff on S3 -> if I remember well, configuring correctly permissions for the bucket is the trickiest part.

In the future, if we had Full Stack Modules (FSMs) for Wasp, this would be a great FSM that you could just plug in. But for now it sounds good to have this as part of the template itself.
Alternatively, it could be something like a "recipe", so it is not in the code immediately, but it is very easy to add -> either by just copying from the docs or even running some command.

from open-saas.

vincanger avatar vincanger commented on May 10, 2024

sounds good @Martinsos. working on this now!

from open-saas.

awalmubarak avatar awalmubarak commented on May 10, 2024

Hey @vincanger , I noticed that using api.post() on the client side was causing a CORS error that I couldn't resolve but it vanished when I switched to fetch. If you're getting the same error at your end, I can update the docs to use fetch

from open-saas.

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.