Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createResumableUpload(options, callback) {
if (is.fn(options)) {
callback = options;
options = {};
}
resumableUpload.createURI(
{
authClient: this.storage.authClient,
bucket: this.bucket.name,
file: this.name,
generation: this.generation,
key: this.encryptionKey,
kmsKeyName: this.kmsKeyName,
metadata: options.metadata,
offset: options.offset,
origin: options.origin,
predefinedAcl: options.predefinedAcl,
private: options.private,
public: options.public,
userProject: options.userProject,
},
callback
File.prototype.createResumableUpload = function(options, callback) {
if (is.fn(options)) {
callback = options;
options = {};
}
resumableUpload.createURI({
authClient: this.bucket.storage.authClient,
bucket: this.bucket.name,
file: this.name,
generation: this.generation,
metadata: options.metadata,
origin: options.origin,
predefinedAcl: options.predefinedAcl,
private: options.private,
public: options.public,
userProject: options.userProject
}, callback);
};