Improve drive downloading (#4523)
* Improve drive file downloading * fix name * wtf crlf * semicolon
This commit is contained in:
parent
d38fc490ad
commit
de47a17be7
6 changed files with 22 additions and 4 deletions
|
@ -5,3 +5,7 @@ export function query(obj: {}): string {
|
|||
.filter(([, v]) => Array.isArray(v) ? v.length : v !== undefined)
|
||||
.reduce((a, [k, v]) => (a[k] = v, a), {} as Record<string, any>));
|
||||
}
|
||||
|
||||
export function appendQuery(url: string, query: string): string {
|
||||
return `${url}${/\?/.test(url) ? url.endsWith('?') ? '' : '&' : '?'}${query}`;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue