doc_upload: Upload document

Description Usage Arguments Details Value Author(s) References

View source: R/doc_upload.r

Description

Upload document to Scribd

Usage

1
2
3
4
5
doc_upload(file = NULL, url = NULL, doc = NULL, ext = NULL,
           access = "public", paid_content = FALSE, drm = NULL,
           wait = FALSE, ...)

upload_thumbnail(file, doc, ...)

Arguments

file

A character string containing a path to a local file to be uploaded. See Details on allowed file types.

url

A character string containing a remote URL from which to upload the file. See Details on allowed file types.

doc

For doc_upload: Optionally, a document id (or object of class “scribd_doc”). If specified, the file upload is treated as a revision of the already existing document. For upload_thumbnail, a document id that the thumbnail will be attached to.

ext

Optionally, a file extension (without the period). This overrides the file extension of the file or, in the case of a URL without a file extension, makes the file type explicit. When possible, the extension will be inferred from file (but not from url).

access

An access level for the document; one of “public” (the default) or “private”.

paid_content

A logical indicating whether should be uploaded as paid content (and thus given protected access and encryption). This cannot be changed after upload.

drm

If paid_content = TRUE, this option configures the download options for the document. Must be one of “download-pdf” (the default), “download-pdf-orig”, or “view-only”.

wait

A logical indicating whether to wait for the document to finish conversion. This may take some time. This parameter simply causes doc_upload to periodically check conversion_status until it is confirmed that the document converted successfully.

...

Other arguments passed to HTTP request functions.

Details

doc_upload uploads a document to Scribd either from a local file or from a remote URL. Image files are not allowed. Allowed file types are: pdf, txt, ps, rtf, epub, key, odt, odp, ods, odg, odf, sxw, sxc, sxi, sxd, doc, ppt, pps, xls, docx, pptx, ppsx, xlsx.

upload_thumbnail sends a thumbnail “cover image” for the document to Scribd. This is, by default, just a small, fuzzy representation of the document itself.

See package vignette for a complete example.

Value

An object of class “scribd_doc”.

Author(s)

Thomas J. Leeper

References

API Reference: upload

API Reference: uploadFromUrl

API Reference: uploadThumb


cloudyr/rscribd documentation built on May 13, 2019, 8:22 p.m.