Class Index

Classes


DecompressFiles

Decompresses compressed files such as .zip files
Defined in: decompressFiles.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DecompressFiles(data, verbose, fields)
For every object in "data", this endpoint decompresses the file into the destination folder and returns the decompressed content info
Class Detail
DecompressFiles(data, verbose, fields)
For every object in "data", this endpoint decompresses the file into the destination folder and returns the decompressed content info
Parameters:
data
An array of object that define the assets to decompress and where to place contents. The default destination is in the same directory as the zip [{"id": 123456, "dest": "destination/path/"}, ...]
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:
[{theDecompressedItemInfo}, ... ]
unzip two files. 201629752 has one file (asset1.xmp) and 201629753 has two (asset1.xmp, asset2.xmp)
/wf/restapi/v2/decompressFiles

Parameters:
data=[{"id":201629752,"dest":"decompressFiles/dest1/"},{"id":201629753,"dest":"decompressFiles/dest2/"}],"verbose":true}
verbose=true

 Response:
 [
	 {
	   "id": 201629754,
	   "name": "asset1.xmp",
	   "path": "decompressFiles/dest1/asset1.xmp",
	   "height": 1,
	   "width": 1,
	   "bytes": 4096,
	   "lastModified": 1508284375000,
	   "mimeType": "application/octet-stream",
	   "previews": {
		 "thumbnail": "../servlet/jb.view?table=thumbnails&col=thumbnails&id=pe_323031363239373534",
		 "viewex": "../servlet/jb.view?table=viewex&col=viewex&id=pe_323031363239373534",
		 "downloadUrl": "../servlet/dload?id=201629754"
	   }
	 },
	 {
	   "name": "zip2",
	   "path": "decompressFiles/dest2/zip2/",
	   "resolver": "directory://309",
	   "assets": [
		 {
		   "id": 201629756,
		   "name": "asset2.xmp",
		   "path": "decompressFiles/dest2/zip2/asset2.xmp",
		   "height": 1,
		   "width": 1,
		   "bytes": 4096,
		   "lastModified": 1508284376000,
		   "mimeType": "application/octet-stream",
		   "previews": {
			 "thumbnail": "../servlet/jb.view?table=thumbnails&col=thumbnails&id=pe_323031363239373536",
			 "viewex": "../servlet/jb.view?table=viewex&col=viewex&id=pe_323031363239373536",
			 "downloadUrl": "../servlet/dload?id=201629756"
		   }
		 },
		 {
		   "id": 201629755,
		   "name": "asset1.xmp",
		   "path": "decompressFiles/dest2/zip2/asset1.xmp",
		   "height": 1,
		   "width": 1,
		   "bytes": 4096,
		   "lastModified": 1508284376000,
		   "mimeType": "application/octet-stream",
		   "previews": {
			 "thumbnail": "../servlet/jb.view?table=thumbnails&col=thumbnails&id=pe_323031363239373535",
			 "viewex": "../servlet/jb.view?table=viewex&col=viewex&id=pe_323031363239373535",
			 "downloadUrl": "../servlet/dload?id=201629755"
		   }
		 }
	   ]
	 }
 ]

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Aug 06 2018 16:08:51 GMT-0500 (CDT)