Yes! I have created the needed folders. As I said the script is working. I can upload and download files. But the files get corrupted or something because after doing an upload, they just don't work on regular web pages. I think the attributes of the files are changing or something.