View source: R/class-exports-utils.R
prepare_items_for_bulk_export | R Documentation |
Utility function to prepare the items
parameter, a list of
elements containing information about each file to be exported using the
bulk_submit_export()
method.
prepare_items_for_bulk_export(
files,
destination_volume,
destination_location_prefix = NULL,
overwrite = TRUE,
properties = NULL
)
files |
A list of |
destination_volume |
Either a |
destination_location_prefix |
Character. If the volume has been
configured with a prefix parameter, If you would like to export the file into a folder on the volume,
please add folder name as the prefix before the file name in the
Keep in mind that the same prefix will be added to all items (files) in the resulting list. |
overwrite |
Logical. If this is set to Keep in mind that the same overwrite option will be applied to all items (files) in the resulting list. |
properties |
Named list of additional volume properties, like:
Keep in mind that the same properties will be applied to all items (files) in the resulting list. |
Based on the provided list of File
objects or
file IDs, this function allows you to set the following fields for each
item:
source_file
destination_volume
destination_location
overwrite
properties
However, keep in mind that there are certain constraints:
The same destination_volume
applies to all items in the
resulting list.
The same applies to overwrite
and properties
parameters.
By default, the destination_location
field is populated with
the source file name. Upon retrieval of the list of items for bulk
export, you can manually update the
destination_location
field for each element of the list as needed.
Additionally, you have the flexibility to manually modify any other
fields in the list if required.
List of body params items for starting an export job.
Exports
, File
, Volume
## Not run:
# Example 1: Prepare 3 items for bulk export action
file_object_1 <- a$files$get(id = "file_1_ID")
file_object_2 <- a$files$get(id = "file_2_ID")
file_object_3 <- a$files$get(id = "file_3_ID")
files_to_export <- list(file_object_1, file_object_2, file_object_3)
prepare_items_for_bulk_export(files_to_export,
destination_volume = "aws_example_volume"
)
## End(Not run)
## Not run:
# Example 2: Prepare 3 items for bulk export action into some folder
# on the volume - use folder name as prefix before file names
file_object_1 <- a$files$get(id = "file_1_ID")
file_object_2 <- a$files$get(id = "file_2_ID")
file_object_3 <- a$files$get(id = "file_3_ID")
files_to_export <- list(file_object_1, file_object_2, file_object_3)
prepare_items_for_bulk_export(files_to_export,
destination_volume = "aws_example_volume",
destination_location_prefix = "example_folder/"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.