← BACK TO BASE

📸 UPLOAD PHOTOS/VIDEOS

Tap or click to upload from your iPhone camera or photo library

📤
Tap to Upload
Photos, Videos, or Multiple Files
Share your thoughts with the family!
POTENTIAL REWARD: 100 XP
0%
Uploading to Google Drive...

🎉 PROJECT SUBMITTED!

🏆
+100 XP Earned!

Your project has been uploaded to Google Drive.
Mom/Dad will review it soon!

📁 Saved to:
Google Drive > Brick Command Projects
3. Initialize and authenticate: */ // Example Google Drive upload function: async function uploadToGoogleDrive(file, metadata) { // Initialize Google API await gapi.client.init({ apiKey: 'YOUR_API_KEY', clientId: 'YOUR_CLIENT_ID.apps.googleusercontent.com', discoveryDocs: ['https://www.googleapis.com/discovery/v1/apis/drive/v3/rest'], scope: 'https://www.googleapis.com/auth/drive.file' }); // Authenticate user await gapi.auth2.getAuthInstance().signIn(); // Create folder structure if doesn't exist const folderId = await createFolder('Brick Command Projects'); // Upload file const fileMetadata = { name: metadata.title + '_' + Date.now() + '.' + file.name.split('.').pop(), parents: [folderId], description: `Project: ${metadata.title}\nBattle: ${metadata.battle}\nReflection: ${metadata.reflection}` }; const form = new FormData(); form.append('metadata', new Blob([JSON.stringify(fileMetadata)], { type: 'application/json' })); form.append('file', file); const response = await fetch('https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart', { method: 'POST', headers: new Headers({ 'Authorization': 'Bearer ' + gapi.auth.getToken().access_token }), body: form }); return response.json(); } async function createFolder(folderName) { // Check if folder exists const response = await gapi.client.drive.files.list({ q: `name='${folderName}' and mimeType='application/vnd.google-apps.folder' and trashed=false`, fields: 'files(id, name)' }); if (response.result.files.length > 0) { return response.result.files[0].id; } // Create folder const fileMetadata = { name: folderName, mimeType: 'application/vnd.google-apps.folder' }; const folder = await gapi.client.drive.files.create({ resource: fileMetadata, fields: 'id' }); return folder.result.id; }