CompressFiles
Compresses the given assets into a single zip asset
Defined in: compressFiles.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
CompressFiles(data, keepDirectoryStructure, verbose, fields)
For every object in "data", this endpoint compresses the assets into a zip file in the destination folder.
|
Class Detail
CompressFiles(data, keepDirectoryStructure, verbose, fields)
For every object in "data", this endpoint compresses the assets into a zip file in the destination folder.
- Parameters:
- data
- An array of objects [{"ids": [123456,789012], "dest": "destination/path/", "name": "nameOfTheCompressed.zip"}, ...]
- keepDirectoryStructure Optional, Default: false
- if true the zipped assets will maintain the folder structure of the assets in MediaBeacon
- verbose Optional, Default: false
- Setting this to true will collect a variety of default values for each asset.
- fields Optional
- An array of field id's to collect the values for each asset
- Returns:
- [{theCompressedFileInfo}, ... ]
/wf/restapi/v2/compressFiles
Parameters:
data=[{"ids":[201629290,201629291],"dest":"destination/path/","name":"testZip.zip"}]
verbose=true
Response:
[
{
"id": 201629292,
"name": "testZip.zip",
"path": "destination/path/testZip.zip",
"height": 0,
"width": 0,
"bytes": 8526,
"lastModified": 1507824864000,
"mimeType": "application/zip",
"previews": {
"thumbnail": "../servlet/jb.view?table=thumbnails&col=thumbnails&id=pe_323031363239323932",
"viewex": "../servlet/jb.view?table=viewex&col=viewex&id=pe_323031363239323932",
"downloadUrl": "../servlet/dload?id=pe_323031363239323932"
}
}
]
/wf/restapi/v2/compressFiles
Parameters:
data=[{"ids":[201629290,201629291],"dest":"destination/path/","name":"testZip1.zip"},{"ids":[201629290,201629291],"dest":"destination/path/","name":"testZip2.zip"}]
Response:
[
{
"id": 201629293
}
},
{
"id": 201629294
}
]