Giter Club home page Giter Club logo

azure-storage-fs's People

Contributors

compulim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

azure-storage-fs's Issues

Add Travis CI

๐Ÿ‘ Everyone can see build progress
๐Ÿ‘Ž No code coverage report, and poor test result visualization

ftpd retrieve directory error: stat-mode unexpected "file type"

I am using azure-storage-fs as the filing system for my ftpd implementation. I can connect to the azure storage, upload a file and read the directory when empty, however when a file exists in the container I get the following error when getting the directory listing via fileZilla:

TypeError: unexpected "file type"
    at Mode.toString (/usr/src/app/node_modules/stat-mode/index.js:91:11)
    at whenReady (/usr/src/app/node_modules/ftpd/lib/FtpConnection.js:612:57)
    at FtpConnection._whenDataReady (/usr/src/app/node_modules/ftpd/lib/FtpConnection.js:155:7)
    at /usr/src/app/node_modules/ftpd/lib/FtpConnection.js:579:12
    at afterWrite (_stream_writable.js:464:3)
    at _combinedTickCallback (internal/process/next_tick.js:144:20)
    at process._tickCallback (internal/process/next_tick.js:180:9)

My connection code is:

    if (pass) {
      success(username, require('azure-storage-fs').blob(
        blobAccountName,
        blobSecret,
        containerName));
      // success(username);
    } else {
      failure();
    }
  });

Looking at stat-mode, it can't determine the type of the file (ie. isDirectory(), etc) and falling through to this exception.

The container I am testing has 1 file and is a block blob type and I have attempted this with classic storage, storage v1 and storage v2.

Any help would be greatly appreciated

My dependancies are

  "dependencies": {
    "async": "^2.6.0",
    "azure-storage": "^2.8.1",
    "azure-storage-fs": "^0.4.0",
    "bluebird": "^3.4.1",
    "debug": "^2.2.0",
    "deep-assign": "^2.0.0",
    "ftpd": "nodeftpd/nodeftpd",
    "dateformat": "1.0.7-1.2.3",
    "stat-mode": "^0.2.2"
  },

Folder restructure

  • lib should be src.
  • package.json should whitelist files
  • Use Babel and embrace ES6
  • Separate functions into different files
    • Enable better testability

Update API docs

Currently, showing quirkiness of API as a way to list our APIs is kind of bad.

Hangs listing directory

Everything is working fine when running it locally.

When I deployed this to an Azure VM the server hangs when listing the directory.

Async cleanup

Remove doWhilst and whilst, replace with async/await.

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.