Git Product home page Git Product logo

any-file's People

Contributors

k2s avatar mcolomer avatar silverxjohn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

any-file's Issues

Unable to transfer file from local to s3

var anyfile = require(__dirname + "/..")();
var fromFile = "E://fonts.zip";
var toFile ="s3://my_aws_access_key_id:[email protected]/my-bucket-name/fonts.zip";

try {
anyfile.from(fromFile).to(toFile, function (err, res) {
console.log(res);
process.exit();
});
} catch (err) {
console.log(err);
}

I am using the above code to transfer files from my local machine to s3 bucket but I am gettting an error as:

PS D:\Divo-SFTP> node .\upload.js
internal/modules/cjs/loader.js:834
throw err;
^

Error: Cannot find module 'D:\Divo-SFTP/..'
Require stack:

  • D:\test\upload.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
    at Function.Module._load (internal/modules/cjs/loader.js:687:27)
    at Module.require (internal/modules/cjs/loader.js:903:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object. (D:\test\upload.js:1:15)
    at Module._compile (internal/modules/cjs/loader.js:1015:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ 'D:\test\upload.js' ]
    }

Please help

Unable to transfer files from aws s3 to aws ec2

var anyfile = require("any-file");
const AnyFile = require("any-file/lib");
var af = new AnyFile();
var fromFile =
"s3://secret_key_id:[email protected]/my-test-bucket/filename.zip";
var toFile =
"sftp://username:[email protected]:public_IP/home/pathname/filename.zip";

try {
af.from(fromFile).to(toFile, function (err, res) {
console.log(res);
process.exit();
});
} catch (err) {
console.log(err);
}

I used the same code to tranfer files from my local machine to aws s3 and vice versa and it worked completely fine.
But when I am trying to transfer files from aws s3 to aws ec2 I am getting a true response but the file is not present in the server. I verified it from filezilla. Could you please help me with this. I have also tried removing the colon after amazon.com, tried adding the public IP of my aws ec2 instance but nothing works. I'm getting a true response but the file is not showing up in the server.

EBS: Cannot find module debug

When deploying an application on Elastic Beanstalk the following error is show.

Error: Cannot find module 'debug'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/var/app/current/node_modules/any-file/lib/index.js:8:10)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)

Everything works before adding any-file.

Publish the latest to npm

Current version of this package that is published to NPM has some issues (e.g. usage of fs.exists which throws). Could you please publish current master to NPM so we can use the updated package.

Slash on S3 credentials causes problems

Hello,

this will fail if a S3 secret key has any "/" on it, which can happen quite often.
The problem seems to be in __parseUrl().

Perhaps checking for the length of username and password in the s3 case could help?
Thanks!

Regards,
Robert

installing any-file without aws-sdk

This is not really an issue, more a security relative concern. ,

I need to install any-file with npm, which seems to require aws-sdk
unfortunately my work environement does't allow me to install aws-sdk (please don't ask me where I work)

Error: Cannot find module 'aws-sdk'
Require stack:

  • /var/www/html/FRANSUA/node_modules/any-file/lib/index.js
  • /var/www/html/FRANSUA/node_modules/any-file/index.js

I have tried to find a way to install any-file wihtout aws-sdk but with no luck.
Is there a way to overcome that ?

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.