API Upload does not work for fileservers

sukhman21

Member
YetiShare User
YetiShare Supporter
Jan 26, 2015
508
3
18
Hello,

Just finished testing all of API functionality and seems like everything works except for uploading files on fileserver.

I have remote direct fileservers and i get an error when uploading. It works fine if i upload it to Local server (Local default).

Here is the error i get (i understand the error says that it is unable to resolve the name but the DNS is fine and i am able to upload / download files from this fileserver normally, this error only shows on the upload API function.)
Code:
{
	"status": "error",
	"response": "Error uploading file to https://fs1.website.com/core/page/ajax/api_upload_handler.ajax.php: Could not resolve: fs1.website.com (Domain name not found)",
	"_datetime": "2017-03-17 14:18:20"
}
 

adam

Administrator
Staff member
Dec 5, 2009
2,046
108
63
From your main server can you ping the file server host? I.e. via ssh
 

sukhman21

Member
YetiShare User
YetiShare Supporter
Jan 26, 2015
508
3
18
Adam,
I got it working now. I had my main server running centos 6 and fileserver running centos 7. i know it shouldnt make a difference but when i upgraded my main server to centos 7, it worked magically. Thanks for the reply though..
 

sukhman21

Member
YetiShare User
YetiShare Supporter
Jan 26, 2015
508
3
18
404 error is possibly due to incorrect nginx rules or htaccess file depending on if you use nginx or apache.

labeouf said:
And im sitting here with a 404 error lol
 

nou4r6311

New Member
YetiShare User
Dec 2, 2016
13
0
1
sukhman21 said:
404 error is possibly due to incorrect nginx rules or htaccess file depending on if you use nginx or apache.

labeouf said:
And im sitting here with a 404 error lol
I directly copied the nginx rules into my config, and the .htaccess file is the original one that has been delivered with the setup.
 

sukhman21

Member
YetiShare User
YetiShare Supporter
Jan 26, 2015
508
3
18
i am confused now that you mentioned nginx rules and .htaccess file.. What server are you running? apache or nginx ? .htaccess does not work with nginx so it wont matter what you do with .htaccess file.

If possible, paste your nginx rules here so i can look at them..