how do we API upload as admin account?

sukhman21

Member
YetiShare User
Jan 26, 2015
508
3
18
Hello all,
i know only Admin account have API hash generated. i am wondering how logging in as admin, we can upload a file using API ??
 

paypal1352

New Member
YetiShare User
Wurlie User
Mar 2, 2012
297
2
0
i think you can upload using api via the upload widget plugin

https://yetishare.com/upload_widget_plugin.html
 

paypal1352

New Member
YetiShare User
Wurlie User
Mar 2, 2012
297
2
0
maybe not, i'm not sure now

in the index file in the api directory this is there

* File API for cross site deletes, uploads, etc.
*
* Requires a valid api key and username. Call in the format:
* http://yoursite.com/api/?key=[key]&username=[username]&action=[method]&file_id=123
*
* Output is json encoded result.
*
* Available methods. Note each may require additional parameters to be passed:
*
* list - Gets list of file ids and urls within account. No additional parameters required
* info - Gets details about a file within the logged in account. Requires file_id
* delete - Deletes a file. Requires file_id
* movefile - Moves a file from 1 server to another.
*/

so it looks like it might be just for moving files between file servers
 

sukhman21

Member
YetiShare User
Jan 26, 2015
508
3
18
i believe the upload widget uploads the file as user and not API. i mean we can this widget on other websites and allow uploading but a lot of the uploaders use the API feature to upload to multiple sites at once which is why i want to utilize this feature.

I looked and checked that api/index.php file but i couldnt figure out the upload feature. i was able to get the list, info, delete working. move file i believe is just for moving file from 1 server to say another fileserver i think but nothing for downloading or uploading......
 

enricodias4654

Member
YetiShare User
Jan 13, 2015
411
1
16
There is no API for upload as admin. The /api/index.php file just copy files between one server to another.
 

sukhman21

Member
YetiShare User
Jan 26, 2015
508
3
18
i see.. Thanks enricodias4654, i ll stop my search now haha..
Usually how would you test uploading if i get API developed? using curl? or is there any other way?
 

enricodias4654

Member
YetiShare User
Jan 13, 2015
411
1
16
sukhman21 said:
i see.. Thanks enricodias4654, i ll stop my search now haha..
Usually how would you test uploading if i get API developed? using curl? or is there any other way?
You can test it using curl or using sockets directly.