 <br>s2: getFile (submit f. nothing)
 <br>will schedule
 <br><a href="uploadMedia.cfm?action=unzip">unzip</a>
+<!---- unzip is either going to work or not - no confirmation ---->
 <br><a href="uploadMedia.cfm?action=rename">rename</a>
+<br><a href="uploadMedia.cfm?action=rename_confirm">rename_confirm</a>
+
+
+
+
 <br><a href="uploadMedia.cfm?action=mkprvw">mkprvw</a>
+<br><a href="uploadMedia.cfm?action=mkprvw_confirm">mkprvw_confirm</a>
+
+
 <br><a href="uploadMedia.cfm?action=s3ify">s3ify</a>
+<br><a href="uploadMedia.cfm?action=s3ify_confirm">s3ify_confirm</a>
+
+
+
+<br><a href="uploadMedia.cfm?action=notify_done">notify_done</a>
+
 
 <hr>
+
+
+<!------------------------------------------------------------------------------------------------>
+<cfif action is "notify_done">
+	<cfoutput>
+		<cfquery name="d" datasource="uam_god">
+			select * from cf_temp_zipload where status='loaded_to_s3' and rownum=1
+		</cfquery>
+		<cfif d.recordcount is 0>
+			found nothing<cfabort>
+		</cfif>
+		<cfquery name="f" datasource="uam_god">
+			select * from cf_temp_zipfiles where zid=#d.zid#
+		</cfquery>
+		<cfset q=QueryNew("TEMP_original_filename, TEMP_new_filename,MEDIA_URI,MIME_TYPE,MEDIA_TYPE,PREVIEW_URI,media_license,media_label_1,media_label_value_1")>
+
+		<cfloop query="f">
+
+
+				,,,,,,")>
+
+
+
+
+			<cfset queryaddrow(q,
+					{
+					TEMP_original_filename=filename,
+					TEMP_new_filename=new_filename,
+					MEDIA_URI=remotepath,
+					MIME_TYPE=mime_type,
+					MEDIA_TYPE=media_type,
+					PREVIEW_URI=remote_preview,
+					media_license='',
+					media_label_1='MD5 checksum',
+					media_label_value_1=md5
+					}
+				)>
+		</cfloop>
+
+		<cfdump var=#q#>
+	</cfoutput>
+</cfif>
+
+<!------------------------------------------------------------------------------------------------>
 <cfif action is "s3ify">
 	<cfoutput>
 		<cfquery name="d" datasource="uam_god">
-			select * from cf_temp_zipload where status='madepreview' and rownum=1
+			select * from cf_temp_zipload where status='previewed' and rownum=1
 		</cfquery>
 		<cfif d.recordcount is 0>
 			found nothing<cfabort>

					</cfif>
				</cftransaction>
			</cfloop>
			<cfquery name="r" datasource="uam_god">
				update cf_temp_zipload set status='madepreview' where zid=#d.zid#
			</cfquery>
		</cfloop>
	</cfoutput>
</cfif>
<!------------------------------------------------------------------------------------------------>

						source = "#Application.webDirectory#/temp/#d.zid#/#filename#"
						destination = "#Application.webDirectory#/temp/#d.zid#/#nfileName#">
					<cfquery name="r" datasource="uam_god">
						update cf_temp_zipfiles set status='renamed',new_filename='#nfileName#' where zid=#d.zid# and filename='#filename#'
					</cfquery>
					<br>new:#nfileName#
				</cftransaction>
			</cfloop>
		</cfloop>
	</cfoutput>
</cfif>

<!------------------------------------------------------------------------------------------------>
<cfif action is "rename_confirm">
	<cfoutput>
		<cfquery name="d" datasource="uam_god">
			select * from cf_temp_zipload where status='unzipped' and rownum=1
		</cfquery>
		<cfquery name="d_f" datasource="uam_god">
			select distinct status from cf_temp_zipfiles where zid=#d.zid#
		</cfquery>
		<cfif valuelist(d_f.status) is "renamed">
			<br>all renamed
			<cfquery name="r" datasource="uam_god">
				update cf_temp_zipload set status='renamed' where zid=#d.zid#
			</cfquery>
		<cfelse>
			<br>rename not complete, do nothing
		</cfif>
	</cfoutput>
</cfif>
<!------------------------------------------------------------------------------------------------>
