mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-22 05:46:26 -08:00
commit
14576c9ed4
|
@ -118,7 +118,7 @@ app.get("/download/:fileId",(req,res) => {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
+ (
|
+ (
|
||||||
fileOwner?.embed?.largeImage && file.visibility!="anonymous"
|
fileOwner?.embed?.largeImage && file.visibility!="anonymous" && file.mime.startsWith("image/")
|
||||||
? `<meta name="twitter:card" content="summary_large_image">`
|
? `<meta name="twitter:card" content="summary_large_image">`
|
||||||
: ""
|
: ""
|
||||||
)
|
)
|
||||||
|
|
|
@ -166,7 +166,7 @@ authRoutes.post("/embedcolor", requiresAccount, parser, (req,res) => {
|
||||||
if (
|
if (
|
||||||
|
|
||||||
!req.body.color
|
!req.body.color
|
||||||
|| (req.body.color.toLowerCase().match(/[a-f0-9]+/) == req.body.color)
|
|| (req.body.color.toLowerCase().match(/[a-f0-9]+/) == req.body.color.toLowerCase())
|
||||||
&& req.body.color.length == 6
|
&& req.body.color.length == 6
|
||||||
|
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in a new issue