Giter Site home page Giter Site logo

Calling S3.delete from server side about s3 HOT 5 CLOSED

luckyvs1 avatar luckyvs1 commented on July 17, 2024
Calling S3.delete from server side

from s3.

Comments (5)

Lepozepo avatar Lepozepo commented on July 17, 2024 1

@luckyvs1 no worries, that is definitely ok :D hope to enable server side uploads and functions again soon (for the very late christmas update lol)

from s3.

Lepozepo avatar Lepozepo commented on July 17, 2024 1

Also @luckyvs1 you can use 3 ticks to format your code ^_^

from s3.

luckyvs1 avatar luckyvs1 commented on July 17, 2024

@Lepozepo, can you confirm if this is a valid solution I have tested it and it works, but want to know if there are any known issues, as I read the server side upload had some errors (re: your comments in #148).

In place of S3.delete, on the server side I would use the S3.knox.deleteFile, so the code is the following:

S3.knox.deleteFile(
  relative_path,
  function(err,response) {
    if(response) {
      console.log('Success, file has been deleted');
    } else {
      console.log('Unable to delete, please try again later');
    }
  }
);

I can't seem to markdown the code with my formatting intact, so apologies for the poorly formatted code.

from s3.

harvinder34 avatar harvinder34 commented on July 17, 2024

is there any update on server side upload?

from s3.

Lepozepo avatar Lepozepo commented on July 17, 2024

@harvinder34 I've been super disconnected from the Meteor community lately, I'll see if I can fit some time into upgrading some of these super old meteor packages next week with some of the new work I have on npm. If you really need server side uploads immediately, you might find it easier to use the aws-sdk package from AWS directly. Just do an npm i aws-sdk in your project and follow AWS's documentation for uploading server files.

from s3.

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.