 		Rename and reload if anything useful was deleted above.
 	</p>
 	</cfoutput>
+	---->
 </cfif>
 <!---------------------------------------------------------------------------->
 <cfif action is "thumb">

	<cfquery name="jid" datasource="uam_god">
		select zid from cf_temp_zipload where jobname='#jobname#'
	</cfquery>

	<!---- now upload the ZIP ---->


	<cffile action="upload"	destination="#Application.webDirectory#/temp/#jid.zid#.zip" nameConflict="overwrite" fileField="Form.FiletoUpload" mode="600">

	Your ZIP has been loaded and a job created. You will receive email from Arctos referencing job #jobname#. Do not delete the ZIP file until you 
	are notified that the process is complete.


</cfif>
<!---------------------------------------------------------------------------->
<cfif action is "unzip">
	<cfzip file="#sandboxdir#/temp.zip" action="unzip"
		destination="#sandboxdir#/"/>
	<cfdirectory action="LIST" directory="#sandboxdir#" name="dir" recurse="no">

	<cfoutput>
	The following files were extracted:
	<table border>
		<tr>

	grant insert,select on cf_temp_zipload to manage_media;


	-- processing table
	-- only UAM will interact; no synonyms necessary
	create table cf_temp_zipfiles (
		zid number not null,
		filename varchar2(255),
		localpath varchar2(255),
		remotepath varchar2(255),
		status varchar2(255)
	);

--->
<cfset goodExtensions="jpg,png">
<cfset baseWebDir="#application.serverRootURL#/mediaUploads/#session.username#/#dateformat(now(),'yyyy-mm-dd')#">
<cfset baseFileDir="#application.webDirectory#/mediaUploads/#session.username#/#dateformat(now(),'yyyy-mm-dd')#">
<cfset sandboxdir="#application.sandbox#/#session.username#">


<hr>
This form is under redevelopment.

cfabort


<p></p>

<br>thisform
<br>s1: <a href="uploadMedia.cfm?action=nothing">nothing</a>
<br>s2: getFile (submit f. nothing)
<br>will schedule
<br><a href="uploadMedia.cfm?action=unzip">unzip</a>

<hr>

<!------------------------------------------------------------------------------------------------>
<cfif action is "nothing">
	<cfoutput>
		<p>
			Upload a ZIP archive of image files. Arctos will attempt to move them to an archival file server, create thumbnail/previews, and
			email you a media bulkloader template.
		</p>
		<ul>
			<li>Only .jpg, .jpeg, and .png (case-insensitive) files will be accepted. File an Issue with expansion requests.</li>
			<li>Archives containing files which start with anything except letters (A-Z, a-z) or numbers (0-9) will be rejected.</li>
			<li>Filenames containing characters other than A-Z, a-z, and 0-9 will be changed.</li>
			<li>The ZIP should contain only image files, no folders etc.</li>
		</ul>

		<cfquery name="addr" datasource="uam_god">
			select get_Address(#session.myagentid#,'email') addr from dual
		</cfquery>

		<form name="mupl" method="post" enctype="multipart/form-data">
			<input type="hidden" name="Action" value="getFile">
			<label for ="username">Username</label>
			<input name="username" class="reqdClr" required value="#session.username#">
			<label for ="email">Email</label>
			<input name="email" class="reqdClr" required value="#addr.addr#">
			<label for ="jobname">Job Name (must be unique; any string is OK; used to keep track of this batch)</label>
			<input name="jobname" class="reqdClr" required value="#CreateUUID()#">
			<label for="FiletoUpload">Upload a ZIP file</label>
			<input type="file" name="FiletoUpload" size="45">
			<input type="submit" value="Upload this file" class="savBtn">
	  </form>
	</cfoutput>
</cfif>
<!------------------------------------------------------------------------------------------------>
<cfif action is "getFile">
	<!---- temp directory is good for 3 days, should be plenty ---->
	<!--- first insert - will guarantee a unique job name ---->
