Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

addFromURL to support pinning, through pin: true option #674

@tunnckoCore

Description

@tunnckoCore

Probably most easier way is along these lines:

  1. Change const sendOneFile = SendOneFile(moduleConfig(arg), 'add') to let

  2. after the check of is valid url, add check for opts.pin === true and recreate sendOneFile

    if (!validUrl(url)) {
      return callback(new Error('"url" param must be an http(s) url'))
    }
    if (opts.pin === true) {
        sendOneFile = SendOneFile(moduleConfig(arg), 'pin/add')
    }
    
    requestWithRedirect(url, opts, sendOneFile, callback)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions