Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@uppy/url: remove private methods from public API #3934

Merged
merged 1 commit into from Aug 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 5 additions & 7 deletions packages/@uppy/url/src/Url.jsx
Expand Up @@ -106,8 +106,8 @@ export default class Url extends UIPlugin {
}

async addFile (protocollessUrl, optionalMeta = undefined) {
const url = this.addProtocolToURL(protocollessUrl)
if (!this.checkIfCorrectURL(url)) {
const url = addProtocolToURL(protocollessUrl)
if (!checkIfCorrectURL(url)) {
this.uppy.log(`[URL] Incorrect URL entered: ${url}`)
this.uppy.info(this.i18n('enterCorrectUrl'), 'error', 4000)
return undefined
Expand All @@ -119,7 +119,7 @@ export default class Url extends UIPlugin {
const tagFile = {
meta: optionalMeta,
source: this.id,
name: this.getFileNameFromUrl(url),
name: getFileNameFromUrl(url),
type: meta.type,
data: {
size: meta.size,
Expand Down Expand Up @@ -187,8 +187,6 @@ export default class Url extends UIPlugin {
}
}

// TODO: remove from prototype in the next major.
Url.prototype.addProtocolToURL = addProtocolToURL
// This is defined outside of the class body because it's not using `this`, but
// we still want it available on the prototype so the Dashboard can access it.
Url.prototype.canHandleRootDrop = canHandleRootDrop
Url.prototype.checkIfCorrectURL = checkIfCorrectURL
Url.prototype.getFileNameFromUrl = getFileNameFromUrl