Description Usage Arguments Value Examples
This function saves the media that were collected during the survey. pull_media should be used once data is downloaded using pull_data and an R dataframe is generated. In the data frame, the media variable will contain links that will be used to download the media files
1 2 3 4 5 6 7 8 9 10 | pull_media(
df,
variable,
username,
password,
folder,
uidvar,
fileformat,
key = NULL
)
|
df |
is the name of the dataframe which contains surveycto data downloaded using pull_data. |
variable |
character: is the name of the form variable which contains the media. |
username |
character: is the username for the account being used to login to the server. |
password |
character: is the password for the account being used to login to the server. |
folder |
character: is the absolute path to the folder where the media files will be downloaded. |
uidvar |
character: any unique id from the df dataset. This variable is used to name the media files. This variable shouldn't contain special characters such as (: , ; ') as such characters aren't allowed in the filename. |
fileformat |
character: is the format in which to save the file. Examples - jpg, png, mp3 |
key |
character: name of the private encryption file, if applicable. If it doesn't contain an absolute path, the file name is relative to the current working directory, getwd(). If the form is encrypted and a key is not provided, only the fields marked as publishable will be returned. Defaults to NULL. |
The media files corresponding to the required variable will be downloaded in the specified folder.
1 2 | pull_media("dataframe_formdata","respondent_picture","user(at)gmail.com","passwordhere","C:/Users//Dropbox/projectfolder/mediafiles/pictures","jpg")
pull_media("dataframe_formdata","respondent_picture","user(at)gmail.com","passwordhere","C:/Users//Dropbox/projectfolder/mediafiles/pictures","jpg",key="C:/Users/Dropbox/projectfolder/encryption_keys/projectdata_PRIVATEDONOTSHARE.pem")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.