aerouk / imageserve

A ShareX image hosting solution for your own domain.
https://iaero.me/imageserve
GNU General Public License v2.0
128 stars 34 forks source link

Weird url returned #66

Closed JustLeader69420 closed 3 years ago

JustLeader69420 commented 3 years ago

Everything works fine, the screenshot gets uploaded and everything BUT it gives me a weird url, it gives back the entire path to the file on the hosting... How would I fix that?

JustLeader69420 commented 3 years ago

https://shit-by.justleader.eu/images/png/t5My9.png That's what it gives me, I can still take the bit out but it's annoying

JustLeader69420 commented 3 years ago

um also while I'm at it, how would I make a Discord embed for this?

JustLeader69420 commented 3 years ago

Okay figured the embed out

JustLeader69420 commented 3 years ago

Figured out the path, I made a custom regex, (([a-z,0-9,A-Z][a-z,0-9,A-Z][a-z,0-9,A-Z][a-z,0-9,A-Z][a-z,0-9,A-Z])\.(gif|jpeg|png|webm)) I think you could make it so much easier but I just made a few screenshots and saw what characters it's making so I put that in a thing and I put in the formats that are in the folders, hope it will work, but now I don't know how I would integrate discord embeds, how would I get the image that's being pulled up in viewer.php? https://shit-by.justleader.eu/wXvtB.png

aerouk commented 3 years ago

It's probably giving you the super long argument because you have the RAW_IMAGE_LINK config option enabled. Also, Discord embeds should just work if you have RAW_IMAGE enabled. I never got round to adding support for other cases like Twitter embeds because the script hasn't been updated in a few years.

On Mon, 1 Mar 2021, 21:11 JustLeader69420, notifications@github.com wrote:

Figured out the path, I made a custom regex, (([a-z,0-9,A-Z][a-z,0-9,A-Z][a-z,0-9,A-Z][a-z,0-9,A-Z][a-z,0-9,A-Z]).(gif|jpeg|png|webm)) I think you could make it so much easier but I just made a few screenshots and saw what characters it's making so I put that in a thing and I put in the formats that are in the folders, hope it will work, but now I don't know how I would integrate discord embeds, how would I get the image that's being pulled up in viewer.php? https://shit-by.justleader.eu/wXvtB.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aerouk/imageserve/issues/66#issuecomment-788289217, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR7LZOON2WWW4UI2XVPE3DTBP7G5ANCNFSM4YNITWSA .

JustLeader69420 commented 3 years ago

Yeah, well, when I enable raw image link, it's just the image, I am just linking to the screenshot, I made an embed in the viewer.phtml, if anyone that looks over this wants, put this and edit the urls and the title, the color and you have a nice embed for yourself :) https://pastebin.com/yBjnvzJn

JustLeader69420 commented 3 years ago

It's all now working so I'll close this