am i out of touch? no, it's sharex who's wrong
This commit is contained in:
parent
129ce8f772
commit
5cfcecd9f9
|
@ -57,12 +57,10 @@ async function add(request,host,path) {
|
||||||
return new Response(`https://${host}/${path}`, {status:201})
|
return new Response(`https://${host}/${path}`, {status:201})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof TypeError) {
|
if (e instanceof TypeError) {
|
||||||
|
if (!dest) return new Response("No file provided", {status:400})
|
||||||
await FILES.put(path, dest)
|
await FILES.put(path, dest)
|
||||||
var type = dest.type
|
|
||||||
if (type === "undefined") type = "text/plain" // dammit sharex
|
|
||||||
await KV.put(path,dest.type)
|
await KV.put(path,dest.type)
|
||||||
return new Response(`https://${host}/${path}`, {status:201})
|
return new Response(`https://${host}/${path}`, {status:201})
|
||||||
// return new Response("No valid URL provided",{status:400});
|
|
||||||
}
|
}
|
||||||
else throw e;
|
else throw e;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue