Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / SendHTTPfile struggling to save file

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Sep 2015 23:06 Edited at: 6th Sep 2015 23:11
I am 95% of the way to uploading a file to my webspace. All of the AppGameKit side is done and successful, I can see from echoing the information on my web server that the file arrived OK.

From this point I use Naphier example code. This suggests that I received the file into the /tmp/ folder but I don't see it there. It then tells me that the folder doesn't exist when trying to move it, but I don't know if it is referring to the source or destination folder.

Here is the code that Naphier contributed:



Here is the response:



I have tried with both the full path and the subdomian path, neither work.
I used /upload/ rather than upload/ in this example but have tried both unsuccessfully.

Once I get this sorted I'd be happy to share a couple of extras if anybody is interested:
Protecting the upload with a hash key (prevents upload of malicious files)
Verifying user against a Joomla (or other) database.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Sep 2015 09:45
Naphier has saved the day

The upload directory is relative to the PHP script. I needed to add a subdirectory to store the uploaded files.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Login to post a reply

Server time is: 2024-11-16 20:34:30
Your offset time is: 2024-11-16 20:34:30