How to make a media file?

The reason that Glitch uses the assets folder for uploading media files is that it stores them on a CDN (content delivery network) this will then take up less space in your code folder which has a limited space within your virtual machine. Your app folder is only about 200MB so you wouldn’t want to use up this space with large media files.

The glitch IDE doesn’t have the ability to upload a file to a named directory, you can only create new files but can create a new file in a directory by naming your file with the directory i.e ‘somedirectory/yourfile.html’.

There are two options you can use to get around this but you will need some working knowledge of using git and working with repositories.

  1. You can start with a github repository that would be set with the directories and files as you want, then create your glitch project from that repository and this would give you the directory and files as you want them.
  2. You can also use git locally to clone the glitch project as each project is also a git repository. You can find all the information you will need in the tools section under git import and export. This will allow you to locally create the folder and file structure as you like it and then push your changes back to the project. There is one change you have to make in the project’s command console that allows you to push your changes Possible to code locally and push to glitch with git? By running the command:
    git config receive.denyCurrentBranch updateInstead

Just remember that you only have a limited space without using the assets.