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 / I cant achieve to upload a file.... i dont know what's wrong, even if it's a problem of the server....

Author
Message
Brny
8
Years of Service
User Offline
Joined: 12th Oct 2015
Location:
Posted: 3rd May 2016 14:07 Edited at: 3rd May 2016 17:24
Hi again to the community, i have a problem, i bought a domain for http operations, i achieved to download files from the server easely, but i am struggling so much trying to upload a file....

I achieved to make the most of the process, it seems to connect and to do everything more or less, (the size should be 1KB), and there's data missing, and the file is not there on the server afterwards. (See screenshot)

Thanks!

Here is my code:

Attachments

Login to view attachments
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 3rd May 2016 14:47
I'm going to guess that this is your problem, I haven't tried myself but maybe it helps.



From the help files the example for SendHTTPRequestASync() doesn't use a return variable. So I wonder if sync2 is ever set to 1?

Also what exactly have you written in uploadfile.php?
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 3rd May 2016 15:12 Edited at: 3rd May 2016 15:14
DA is right. Use GetHTTPResponseReady() to check the status.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Brny
8
Years of Service
User Offline
Joined: 12th Oct 2015
Location:
Posted: 3rd May 2016 16:38 Edited at: 3rd May 2016 17:25
Hi, thanks for the help, i went to make a walk to relax and now i opened the program again and with the same code it gives me this error, i hope it comes from a windows update... (see image)

I tried to make some changes, but now i get only this annoying error....

The upload.php file is the default one provided on the AppGameKit info.

Attachments

Login to view attachments
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd May 2016 16:52
Remember, when you upload a file, it's placed in a temporary area until your php file moves it to the correct location.

So if you upload a file and give it a server destination of "/files/uploads/file.txt" it won't actually go there until your PHP moves it from the temp location to the correct location.
Brny
8
Years of Service
User Offline
Joined: 12th Oct 2015
Location:
Posted: 3rd May 2016 17:18 Edited at: 3rd May 2016 21:47
Cool, yes you are right, i just messed up with the domain pointers... now it seems it is fixed.

i'm getting closer... but i dont achieve yet to have really my file inside my domain, till now reality was joking me (see picture)

I just removed the sync2 part

Attachments

Login to view attachments
Brny
8
Years of Service
User Offline
Joined: 12th Oct 2015
Location:
Posted: 3rd May 2016 17:21 Edited at: 3rd May 2016 17:28
OHHHH i achieved it!!!! thank you very much!!! i was really catched with that one.

Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd May 2016 18:58
Glad to help.

Login to post a reply

Server time is: 2024-04-24 09:24:42
Your offset time is: 2024-04-24 09:24:42