Python Upload - 405

I am trying to make it so that you can upload files to a folder in my website, but i get a 405 HTTP error, help?


Try uploading this:
Untitled

Hey,

You cannot upload assets to static sites.

if i add a package.json file the logs keep loading and loading and the website is stuck on “starting”

I would recommend remixing the express starter and start from there, if you want to do Node. Please note that for Glitch to detect a Python project, you need a requirements.txt file.

2 Likes

SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at /opt/watcher/source/app-picker.ts:107:39
at ChildProcess.exithandler (child_process.js:285:7)
at ChildProcess.emit (events.js:189:13)
at ChildProcess.EventEmitter.emit (domain.js:441:20)
at maybeClose (internal/child_process.js:970:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

What shall i add to the requirements.txt?

I would recommend that you take some time to learn python.

i am using a tutorial.

Ok, well I would recommend that you learn about Django, its python on the web.

2 Likes

I can’t download stuff

What do you mean?

as

You are doing this on Glitch right, not your personal machine?

I am doing this on glitch.
There’s literally no way to use django without installing it

Why not just remix a Django starter?

i just wanna use python

You have to learn python to use python you know.

i have a team of coders who use python you know.

Ok, well I guess you should learn python then?

Ok, could you mark the post that solved your problem please?

1 Like

To use python for the online remix the hello-flask project

That is for Flask projects only. :stuck_out_tongue:

@no_one, I took a look at your index.html and it looks like you are sending POST requests to the wrong PY file. (By the way, I do not know how to use Flask.)

so what’s the right PY file :laughing:

Check the spelling of the PY file and you will get it on your own. :stuck_out_tongue_winking_eye:

1 Like

No, you cannot run python on a static site. You will get an “Unacceptable” HTTP error if you try to upload files on static sites!

Just a friendly note, @no_one, you do not need to have space on your computer to use any Python (or any other language or framework’s) modules. The module will be installed on Glitch’s servers not your computer. :slightly_smiling_face:

No, that’s not what i was saying, RiversideRocks prompted me to install Django

Can you explain why your windows computer has less storage than an sd card?

6 Likes

we’re talking about installing django on glitch not on your local computer

3 Likes

He recommended you to

Django not download.

2 Likes

I have a Raspberry pi 4 Model B which has a shocking 256 gigabytes in it with a lifetime warranty :wink:

I have enough space to download NOOBS, then get raspbian and a bunch of other OSes, maybe run chromeOS on there, I don’t know… windows

and you have zero bytes on the C drive

And @RiversideRocks its microSD

Card for proof: https://www.amazon.com/SanDisk-256GB-microSDXC-Memory-Adapter/dp/B0758NHWS8/ref=sxin_9_ac_d_pm

I reccomend you buy a PI0 or get more storage, because man, you have no storage.

Someone just make a django starter for @no_one if he doesn’t want to buy stuff.

I would also have a suspicion it has less than required storage for Windows 10 64 bit

Just put flask in requirements.txt and suck up the five minute limit. Because there is no breaking rules here.

2 Likes

Chromeos is defintnally installable, I’ve done it own a 32gb SD Card.
I don’t see how it’s possible to buy a 9.25 drive, and I don’t think anyone every partions their drive by quarters either

3 Likes

alright, here it is- in order to use modules like flask (i personally reccomend it) or django you need to have a way of installing them and reinstalling if something goes wrong.

If you use a requirements.txt, your project turns non-static.

Yes, but I recommend keeping it blank or Glitch may reinstall the modules listed in it every time your project is woken up.

Erm… Better to keep it out altogether

He could be on a virtual machine for some reason.

i am not.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.