File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -129,13 +129,19 @@ export default class Url<M extends Meta, B extends Body> extends UIPlugin<
129
129
protocollessUrl : string ,
130
130
optionalMeta ?: M ,
131
131
) : Promise < string | undefined > => {
132
+ // Do not process local files
133
+ if ( protocollessUrl . startsWith ( 'blob' ) ) {
134
+ return undefined
135
+ }
132
136
const url = addProtocolToURL ( protocollessUrl )
133
137
if ( ! checkIfCorrectURL ( url ) ) {
134
138
this . uppy . log ( `[URL] Incorrect URL entered: ${ url } ` )
135
139
this . uppy . info ( this . i18n ( 'enterCorrectUrl' ) , 'error' , 4000 )
136
140
return undefined
137
141
}
138
142
143
+ this . uppy . log ( `[URL] Adding file from dropped/pasted url: ${ url } ` )
144
+
139
145
try {
140
146
const meta = await this . getMeta ( url )
141
147
@@ -187,14 +193,12 @@ export default class Url<M extends Meta, B extends Body> extends UIPlugin<
187
193
188
194
private handleRootDrop = ( e : DragEvent ) => {
189
195
forEachDroppedOrPastedUrl ( e . dataTransfer ! , 'drop' , ( url ) => {
190
- this . uppy . log ( `[URL] Adding file from dropped url: ${ url } ` )
191
196
this . addFile ( url )
192
197
} )
193
198
}
194
199
195
200
private handleRootPaste = ( e : ClipboardEvent ) => {
196
201
forEachDroppedOrPastedUrl ( e . clipboardData ! , 'paste' , ( url ) => {
197
- this . uppy . log ( `[URL] Adding file from pasted url: ${ url } ` )
198
202
this . addFile ( url )
199
203
} )
200
204
}
You can’t perform that action at this time.
0 commit comments