Uploading a whole folder

Is there a way to upload a folder, or is it unsupported yet?

I have a folder which contains stuff for the main script, but I don’t feel like uploading one by one, or uploading all then renaming each one into a folder.

2 Likes

You can try putting all of your folder into github, and then import from github.
Yeah its not easy as you wanted it to be, but its the way around.

And as far as I am aware, there’s no way of uploading folder in gitch.

Ah, okay. Do hope they add this feature though.

Another solution is to do the following:

  • Create a ZIP file of the files or folders you want
  • Upload it to the assets folder in your project, click it and click “Copy Url”
  • Navigate to “Settings > Advance Options > Open Console” in your project
  • In the console, first we want to pull the zip file from the url
$ wget -O file.zip https:///url-to-your-zip
  • Then we want to extract it to the current directory
$ unzip file.zip -d .
  • Then we want to remove the zip file
$ rm file.zip
  • Finally we want to refresh our app so the new files are shown in the editor
$ refresh

That’s it, hope this helps!

30 Likes

Cool, thanks! That works just as I wanted.

1 Like

@kinduff Thanks for the detailed procedure. I`m trying to upload gltf model which has many textures in a folder. I tried following your steps, and it seemed like all was working ok, but back in the editor, the assets still contains the same original zip instead of any new files, even though I entered refresh in the console.

Note that with the instructions above, the files will be imported in to the root directory of your project and do not appear under ‘assets’ in the Glitch editor. Try running ls -l from the command line and you should see a list of your imported files alongside your other project files. They can be accessed via your app’s code even if you can’t see them in the editor.

5 Likes

+1 please add an “upload folder” button next to “upload file”
These workarounds will work, but there have been many times I’ve just given up on using glitch when I get to this step. I imagine I am not the only one

6 Likes

Hi @flomerboy !
If you have a minute, can you post this in our Feature Ideas section?
We regularly track the posts there and share them with the rest of the Glitch team!
Feature Ideas also allows other users to weigh in by voting for your request.

1 Like

Please vote for this feature idea Upload Folder! Arghhhhh

1 Like

What about uploading zips then unziping from the console? (but you have my vote)

1 Like

Is it possible to upload with terminal for static sites?

Yes, the terminal is available for every Glitch project irrespective of the project type.

5 Likes