var retStatusStruct = "failed"; // Create the CS Content CFC //var csContent = server.ADF.objectFactory.getBean("CSContent_1_0"); //application.ADF.utils.doDump(arguments.dataValues,"arguments.dataValues", false); // Create the page retStatusStruct = application.ptPhotoGallery.CSContent.populateContent("Photo", arguments.dataValues); var pageResult = ""; var dataStruct = StructNew(); var binarydata = ""; var tempPhotoDescription = arguments.photoDescription; var tempDescription = listfirst(listlast(arguments.imgDir,"/"),"."); var csUpload = ""; if (len(tempPhotoDescription) eq 0) { photoDescription = tempDescription; } else { photoDescription = tempPhotoDescription; } dataStruct.LocalFileName = "#arguments.imgDir#"; dataStruct.public = true; dataStruct.category = "Photo Gallery"; dataStruct.description = photoDescription; // create the page pageResult = application.ptPhotoGallery.csUpload.uploadImage(request.subsite.id, dataStruct, binarydata); return pageResult; var configStruct = StructNew(); configStruct.docPath = "#request.subsiteCache[1].dir#uploads/"; configStruct.docURL = "#request.subsiteCache[1].url#uploads/"; // Config - UPLOADPATH if ( (StructKeyExists(server.ADF.environment[request.site.id].ptPhotoGallery, "UPLOAD_PATH")) AND (LEN(server.ADF.environment[request.site.id].ptPhotoGallery.UPLOAD_PATH)) ) configStruct.docPath = server.ADF.environment[request.site.id].ptPhotoGallery.UPLOAD_PATH; // Config - UPLOADURL if ( (StructKeyExists(server.ADF.environment[request.site.id].ptPhotoGallery, "UPLOAD_URL")) AND (LEN(server.ADF.environment[request.site.id].ptPhotoGallery.UPLOAD_URL)) ) configStruct.docURL = server.ADF.environment[request.site.id].ptPhotoGallery.UPLOAD_URL;