Use assets folder in a twitter bot?

hi, I’m building a twitter bot (https://glitch.com/edit/#!/fritzvondardel). To post media tweets the files need to local. Is it possible to use the images in the Glitch assets folder (that, as I understand it, are hosted on a separate domain) as local files in an express app or do I need to add the files in a local folder?

In the project I have currently added images locally using the glitch console and wget, but it would be a lot easier if I could drag and drop into the assets folder.

I’ll try the helper function from this project: https://glitch.com/edit/#!/random-image-twitterbot but if there are easier ways I’m all ears!

Hi, haven’t worked with express before so I don’t know if you can use the assets directly in your request. But if you want to save the images locally via drag and drop, I guess you can create a watcher for the .glitch-assets file. When it’s changed, the script will run and wget the added items to a directory of your choice.

1 Like