Friday, August 14, 2009

Uploaded Files Support

In PHP there is a $_FILES superglobal variable, which contains information about the uploaded file that have been stored to the temporary folder. In PHP, files and the rest of the form variables are treated separately.

In web-server, the uploaded files are treated just the same as rest of the form variables, i.e. you can access them through $query. The advantage of this approach is that you do not have think about file separately, but the disadvantage is that web-server will hold all of the uploaded files in memory, so the actual total upload size will be limited to the available RAM.

We are not going to solve that particular limit for web-server right now, instead, we want to think about whether it makes sense to have a $files parameter separately from $query, so it appears more similar to PHP.

I think at this moment it makes no sense to treat files the same way as PHP. So we'll keep them in $query.

No comments:

Post a Comment