Scribd API - 这可能吗?

发布于 2024-07-26 04:16:30 字数 497 浏览 4 评论 0原文

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

对于那些了解的人Scribd,用过它或者可以看看上面的API。

谁能告诉我是否可以将文档从我的网站直接上传到 scribd?

我问这个问题是因为从 API(PHP 实现)来看,我似乎必须首先要求我的用户将文件上传到我的服务器,然后我从那里上传到 scribd。 就像这个例子:

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

谢谢大家

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

御弟哥哥 2024-08-02 04:16:30

如果我理解正确的话,您希望用户上传文件,然后将其直接上传到 scribd,而不存储在您的服务器上。

如果是这种情况,应该可以像 php 文件上传一样处理它,只不过只是将文件传递给 scribd 而不是存储它。

通过典型的上传表单上传后,将其传递:

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

这只是用户刚刚上传的临时文件的路径

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文