WIP for validate photo file
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 21 Jun 2017 20:46:42 +0000 (16:46 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 21 Jun 2017 20:46:42 +0000 (16:46 -0400)
working on the upload for photo file.

models/admin/import/index.php

index 560d5ac..902053c 100644 (file)
@@ -376,6 +376,15 @@ class GlmMembersAdmin_import_index
             $view = 'processMembers.html';
             break;
 
+        case 'photosValidate':
+            if ( isset( $_FILES ) ) {
+                move_uploaded_file( $_FILES['photos_file']['tmp_name'], $uploadPath . '/photoData.csv'  );
+            }
+            // validate the header line
+            $fData = $this->readCSVFileHeaders( $uploadPath . '/photoData.csv' );
+
+            break;
+
         case 'photos':
             $view= 'photos.html';
             $fileData = '<pre>$_FILES: ' . print_r( $_FILES, true ) . '</pre>';