simpletechs / dpd-storage-pkgcloud Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
I am getting No such Key error when trying to access files because in filepath a backslash gets added.I saw that there are checks to remove forwardslash so inserted this bit of code to check and remove backslash too.That fixes the problem.
filepath = filepath[0] == '\\' ? filepath.substr(1) : filepath,
In context's url a backslash gets added.
if (this.url.indexOf('/') !== 0) this.url = '/' + this.url;
I have sent a PR #3 with this small change.
I need to extend this module to incorporate Azure blob storage. To do this, I added an if and a few config parameters to the dashboard. It works well at uploading data and upon uploading does fine at returning the URL for the file.
However, the get endpoints don't work correctly.
In the Amazon setup there is a require for a PKGFile variable.
// monkey-patch getURL-functions
PKGFile = require('./lib/pkgcloud-s3-geturl');
I see that this sets up the signed urls. Unfortunately, pkgcloud doesn't include the similar SAS uri's from Azure, so doing a 1:1 implementation isn't possible (atm).
If I exclude this, the module errors out when I try to access the file.
I tried creating a similar "pkgcloud-azure-geturl" module but I can't quite get it to work.
// monkey-patch getURL-functions
PKGFile = require('./lib/pkgcloud-azure-geturl');
This function goes into a loop, I assume because the program thinks this is a signed url, but it's just a regular one.
// './lib/pkgcloud-azure-geturl'
var File = require('pkgcloud').providers.azure.storage.File;
File.prototype.getURL = function(action, cb) {
action = (action==='GET'?'getObject':(action==='PUT'?'putObject':''));
if(!action) return cb('action required', null);
// hello, this is dog
this.client.getFile(this.container.name, this.name, cb);
}
module.exports = File;
What should I be putting here?
Hi,
I installed deployd my digitalocean cloud, and I install this pkg but I dont understand how to run this.
How can I access file service ,also I cannot find config for it.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.