chughes741 / webserv

HTTP server written in C++
2 stars 0 forks source link

POST Request (Upload file) #93

Open francislah opened 10 months ago

francislah commented 10 months ago

When POST is received with Content-Type: text/plain the file should be created or updated.

thelord82 commented 9 months ago

File uploads correctly, still some cases to handle :

thelord82 commented 9 months ago

As of 12/08:

File uploads are fine. File renames itself if a file with the same name already exists. There is no overwriting a file of any sort.

When a file is uploaded (or when the upload button is clicked with no file chosen in index.html), the uploads directory content is listed with every file, and a corresponding delete button.

I need to handle better the upload of larger files. It can sometimes causes an exception throwing (still uncaught for now). Need to handle the length of the string of data that is taken on the upload so it doesn't crash. When fixed, we'll basically be able to upload any reasonable file, regardless of its size.

The goal is when I click on any file, is either to display its content and / or download the file to the computer. Doesn't work yet but functions that do this are in place. Need to attach all of it together.