Image Hosting in Glitch

How can I build a site where I can host my images using Glitch?

You can set an express server and use express-fileupload module. You can store files in your project’s file system in that way.

But have in mind that your project is limited to 200Mb disk space.

Yes i just wanted to give a example of one that works (i didnt make it but this persom did and said that this game arras used to be a meme site and it got hacked or some junk but either way it works)

1 Like

I made one myself to show the code. You can remix if you want.

To do list:
send error when file is not an image
send error if the images are greater than … megabytes -> Not working really…
change extension (.bmp/.png/.gif) depends the file
wipe images older than … days|

1 Like

nice but also in arras memes you can uplad any file and i kinda like that because it makes it almost a improved pastbin because you can put ANY file so just sayin

also did you remix the arras meme one i showed beccause it looks the same lol

I could’nt remix it. I just took the public html files.

I made by myself the server code. Looking the documentation of the libraries.

@EARROCK asked for image hosting, that is because I made it only for that type of files :slight_smile:

I let the code public, so anyone can remix the project and modify whatever they want, also if they want to upload any type of file

ahh ok thats why it looks the same i never checked to see if you could actualy remix it at all

I have examples in node, and go.
Ill be expanding it soon

hey do you know how to the the file type if it isnt a image bc im making my own but i want more than images and the thing that you have doesnt frok

const accepted_extensions = ['jpg', 'png', 'gif'];

if (accepted_extensions.some(ext => !file.originalname.endsWith("." + ext))) {
  return cb(null, true);

Add ! there. Try. I will check it later

? What do you mean