This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| service: thumbnail-creator | |
| custom: | |
| bucket: <your-bucket-name-here> | |
| provider: | |
| name: aws | |
| runtime: nodejs6.10 | |
| resources: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| service: thumbnail-creator | |
| custom: | |
| bucket: <your-website-bucket-name-here> | |
| uploadBucket: <your-upload-bucket-name-here> | |
| provider: | |
| name: aws | |
| runtime: nodejs6.10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div id="app"> | |
| <router-view/> | |
| </div> | |
| </template> | |
| <script> | |
| export default { | |
| name: 'app' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Vue from 'vue' | |
| import Router from 'vue-router' | |
| import Home from '@/components/Home' | |
| Vue.use(Router) | |
| export default new Router({ | |
| routes: [ | |
| { | |
| path: '/', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div> | |
| <upload-form/> | |
| </div> | |
| </template> | |
| <script> | |
| import UploadForm from '@/components/uploadForm.vue' | |
| export default { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div :class="$style.container"> | |
| <form @submit.prevent="handleSubmit"> | |
| <div :class="$style.input"> | |
| <input @change="handleFileChange" :class="$style.file" type="file" name="files[]" id="file" data-multiple-caption="{count} files selected" multiple /> | |
| <label for="file">Choose files</label> | |
| </div> | |
| <h3>Files To Upload</h3> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict' | |
| const path = require('path') | |
| const utils = require('./utils') | |
| const config = require('../config') | |
| const Config = require('config') | |
| const fs = require('fs') | |
| const vueLoaderConfig = require('./vue-loader.conf') | |
| fs.writeFileSync(path.resolve(__dirname, '../config/client.json'), JSON.stringify(Config)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict' | |
| const path = require('path') | |
| const utils = require('./utils') | |
| const config = require('../config') | |
| const Config = require('config') | |
| const fs = require('fs') | |
| const vueLoaderConfig = require('./vue-loader.conf') | |
| // we'll use the Config package and write the output with a json file inside of the config directory | |
| fs.writeFileSync(path.resolve(__dirname, '../config/client.json'), JSON.stringify(Config)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "aws": { | |
| "accessKeyId": "your access key here", | |
| "secretAccessKey": "your secret access key here", | |
| "uploadBucket": "your upload bucket name here", | |
| "region": "your region here" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {config, S3} from 'aws-sdk' | |
| import {aws} from 'config' | |
| import {map} from 'lodash' | |
| const {region, accessKeyId, secretAccessKey, uploadBucket} = aws | |
| config.update({ | |
| region: region, | |
| credentials: { | |
| accessKeyId: accessKeyId, |