Remove query string from filename in Post from URL feature.
This commit is contained in:
parent
0048da77f6
commit
c2d1f7ef4c
@ -88,7 +88,7 @@ CrossOrigin =
|
|||||||
file: (url, cb) ->
|
file: (url, cb) ->
|
||||||
CrossOrigin.binary url, (data, headers) ->
|
CrossOrigin.binary url, (data, headers) ->
|
||||||
return cb null unless data?
|
return cb null unless data?
|
||||||
name = url.match(/([^\/]+)\/*$/)?[1]
|
name = url.match(/([^\/?#]+)\/*(?:$|[?#])/)?[1]
|
||||||
contentType = headers.match(/Content-Type:\s*(.*)/i)?[1]
|
contentType = headers.match(/Content-Type:\s*(.*)/i)?[1]
|
||||||
contentDisposition = headers.match(/Content-Disposition:\s*(.*)/i)?[1]
|
contentDisposition = headers.match(/Content-Disposition:\s*(.*)/i)?[1]
|
||||||
mime = contentType?.match(/[^;]*/)[0] or 'application/octet-stream'
|
mime = contentType?.match(/[^;]*/)[0] or 'application/octet-stream'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user