I’m trying to create a function for my discord bot that will take pictures. Part of it is to use PhantomJS to take pictures of certain sites, and upload them. I followed a quick tutorial here (https://www.youtube.com/watch?v=uth42KwjTik) to verify that it works locally off glitch, but am struggling to get it to save in the assets folder. I took a look at this thread (How to save graphic from p5js to assets) but couldn’t seem to hack my way into it. If anyone has any insight here, I would greatly appreciate it. Thanks!
Wow, thanks so much for taking the time to do that! I tried copying your code exactly into a temp project, and ran it by opening up the site (which showed the google image). According to the console, the image was created too, but I can’t seem to find it in the files. Perhaps I missed a step? The reason I’m trying to save the file is because I’m trying to send the image over discord rather than route it for front end use.
EDIT: Actually, it seems like Glitch might just take a really long time for these images to show up? I opened up my original project, and the image I had saved last night actually shows up now.
For now, the filesystem and the editor don’t automatically sync. You can manually run the refresh command and it will force a refresh, updating the editor with any code-created files. Note though that the files are being created on the filesystem all along so your code can use them, it’s just the editor doesn’t show them right away.