views:

554

answers:

1

Hello all,

Scribd API: http://www.scribd.com/developers

For those of you that are aware of Scribd, used it or can take a look at the API above.

Can anyone tell me if it is possible to upload documents from my site straight to scribd?

I ask because from the API (PHP Implementation) it seems that I have to first ask my users to upload the files to my server and from there I hjave to upload to scribd. Like this example:

$file = '../testfile.txt'; 
//a reference to the file in reference to the current working directory. 
$data = $scribd->upload($file, $doc_type, $access, $rev_id);

Thanks all

+1  A: 

If I understand correctly, you want users to upload a file, and then upload it directly to scribd without ever storing on your server.

If this is the case, it should be possible to handle it similar to a php file upload, except simply pass the file along to scribd rather than storing it.

After uploading through a typical upload form, pass it along:

$file = $_FILES[input_name]["tmp_name"];
$data = $scribd->upload($file, $doc_type, $access, $rev_id);

This is simply the path of the temporary file that the user just uploaded

Ian Elliott