How to automatically rename files?

Hi,

I’m trying to host images on my glitch project, but the file extension is too long and not customisable. So i how do I automatically rename image files?

Project:
[Invite Removed - To protect your code, please send invites to individuals only via private message]

I don’t belive that there is a way to do this. You can always just click the three dots and press “rename”.

Hi, I’m in. Can you share the code?

hi there! you currently cannot rename files in the assets section of a project, you’d have to rename them on your computer before uploading to change the names. if you import them into your project (from git import or using wget in the terminal) then you’re able to rename files.

2 Likes

Hooo my bad, I forgot that the medias are located into “assets”, so we can’t use fs!

Jenn, the images are stored under img/ file. Not under the project assets : )

They are stored in the assets (CDN) to save space for other data on the project.

1 Like