Class Index

Classes


Upload

Upload an asset into MediaBeacon
Defined in: upload.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Upload(file, dest, unzip, replace, verbose, fields)
For every asset defined in "data", this endpoint sets the xmp from the given xmp string
Class Detail
Upload(file, dest, unzip, replace, verbose, fields)
For every asset defined in "data", this endpoint sets the xmp from the given xmp string
Parameters:
file
the file needs to be added to the body of the POST in the form data with the name "file"
dest
the path to the destination folder "upload/here/"
unzip Optional, Default: false
unzip the uploaded files
replace Optional, Default: false
if a file already exists in the destination, replace it with the uploaded file
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:
[{assetInfo}, ... ]
/wf/restapi/v2/upload

Parameters:
file={{FILE DATA IN POST BODY}}
dest="upload/here/"
verbose=true

Response:
 [
	 {
		 "id": 201629401,
		 "name": "heic0006a_orig.tif",
		 "path": "upload/here/heic0006a_orig.tif",
		 "height": 746,
		 "width": 1500,
		 "bytes": 1459026,
		 "lastModified": 1508187662000,
		 "mimeType": "image/tiff",
		 "previews": {
			 "thumbnail": "../servlet/jb.view?table=thumbnails&col=thumbnails&id=pe_323031363239343031",
			 "viewex": "../servlet/jb.view?table=viewex&col=viewex&id=pe_323031363239343031",
			 "downloadUrl": "../servlet/dload?id=201629401"
		 }
	 }
 ]
/wf/restapi/v2/upload

Parameters:
file={{ZIPPED FILE}}
dest="upload/here/"
unzip=true
verbose=true

Response:
 [
	 {
		 "name": "hubble",
		 "path": "upload/here/",
		 "resolver": "directory://162",
		 "assets": [
			 {
				 "id": 201629404,
				 "name": "heic0006a_orig.tif",
				 "path": "upload/here/heic0006a_orig.tif",
				 "height": 746,
				 "width": 1500,
				 "bytes": 1459026,
				 "lastModified": 1262635000,
				 "mimeType": "image/tiff",
				 "previews": {
					 "thumbnail": "../servlet/jb.view?table=thumbnails&col=thumbnails&id=pe_323031363239343034",
					 "viewex": "../servlet/jb.view?table=viewex&col=viewex&id=pe_323031363239343034",
					 "downloadUrl": "../servlet/dload?id=201629404"
				 }
			 },
			 {
				 "id": 201629405,
				 "name": "heic0106a1_orig.tif",
				 "path": "upload/here/heic0106a1_orig.tif",
				 "height": 573,
				 "width": 564,
				 "bytes": 817080,
				 "lastModified": 1262635000,
				 "mimeType": "image/tiff",
				 "previews": {
					 "thumbnail": "../servlet/jb.view?table=thumbnails&col=thumbnails&id=pe_323031363239343035",
					 "viewex": "../servlet/jb.view?table=viewex&col=viewex&id=pe_323031363239343035",
					 "downloadUrl": "../servlet/dload?id=201629405"
				 }
			 }
		 ]
	 }
 ]

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