Skip to content

Commit e30b0dc

Browse files
committed
fix: multi file upload input validation
1 parent 7d017ee commit e30b0dc

File tree

6 files changed

+63
-5
lines changed

6 files changed

+63
-5
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
FireStarter is designed to handle the basic features most Angular+Firebase apps need. It can serve as a foundation to quickly roll out more complex features.
44

5+
[Live Demo](https://firestarter-96e46.firebaseapp.com/)
6+
[Lessons and Screencasts](https://angularfirebase.com)
7+
58
## Features
69

710
- Authentication w/ Router Guard
@@ -47,3 +50,4 @@ And finally `ng serve`
4750
## Apps Using FireStarter in Production
4851

4952
- [ArtiFilter](https://app.artifilter.com) - Neural Art Generator
53+
- [FlashLawyer](https://flashlawyer.com) - Legal Document Builder and Chatbot

firebase-debug.log

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[debug] ----------------------------------------------------------------------
2+
[debug] Command: /usr/local/bin/node /usr/local/bin/firebase init
3+
[debug] CLI Version: 3.5.0
4+
[debug] Platform: linux
5+
[debug] Node Version: v7.6.0
6+
[debug] Time: Thu Jun 15 2017 06:28:03 GMT-0700 (MST)
7+
[debug] ----------------------------------------------------------------------
8+
[debug]
9+
[debug] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase"]
10+
[info]
11+
######## #### ######## ######## ######## ### ###### ########
12+
## ## ## ## ## ## ## ## ## ## ##
13+
###### ## ######## ###### ######## ######### ###### ######
14+
## ## ## ## ## ## ## ## ## ## ##
15+
## #### ## ## ######## ######## ## ## ###### ########
16+
17+
You're about to initialize a Firebase project in this directory:
18+
19+
/home/jeffd23/apps/firestarter
20+
21+
Before we get started, keep in mind:
22+
23+
* You are initializing in an existing Firebase project directory
24+
25+
[info]
26+
=== Project Setup
27+
[info]
28+
[info] First, let's associate this project directory with a Firebase project.
29+
[info] You can create multiple project aliases by running firebase use --add,
30+
[info] but for now we'll just set up a default project.
31+
[info]
32+
[debug] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
33+
[debug] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token { refresh_token: '1/2SaRBZwM6YRj7xy8mT8krZbeLshR9iOZ1GQYwXSHe4Q',
34+
client_id: '563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com',
35+
client_secret: 'j9iVZfS8kkCEFUPaAeJV0sAi',
36+
grant_type: 'refresh_token',
37+
scope: 'email https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/firebase openid' }
38+
Thu Jun 15 2017 06:28:06 GMT-0700 (MST)
39+
[debug] <<< HTTP RESPONSE 200
40+
[debug] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects
41+
Thu Jun 15 2017 06:28:07 GMT-0700 (MST)
42+
[debug] <<< HTTP RESPONSE 200
43+
[info] i .firebaserc already has a default project, skipping
44+
[info]
45+
=== Database Setup
46+
[info]
47+
[info] Firebase Realtime Database Rules allow you to define how your data should be
48+
[info] structured and when your data can be read from and written to.
49+
[info]

src/app/uploads/upload-form/upload-form.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export class UploadFormComponent implements OnInit {
3030

3131
uploadMulti() {
3232
let files = this.selectedFiles
33+
if (_.isEmpty(files)) return;
34+
3335
let filesIndex = _.range(files.length)
3436
_.each(filesIndex, (idx) => {
3537
this.currentUpload = new Upload(files[idx]);

src/app/users/user-login/user-login.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<h3>Social Login</h3>
44

55

6-
<button (click)="signInWithGoogle()" class="button btn-social btn-google">
6+
<button (click)="signInWithGoogle()" class="button btn-social btn-google">
77
<i class="fa fa-google-plus fa-lg"></i> Connect Google
88
</button>
99

src/index.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
<meta charset="utf-8">
55
<title>Firestarter</title>
66
<base href="/">
7-
8-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.1/css/bulma.min.css">
9-
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous"> -->
10-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
117
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
128
<link rel="icon" type="image/x-icon" href="favicon.ico">
9+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.1/css/bulma.min.css">
10+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
1311
</head>
1412
<body>
1513

src/styles/firestarter.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
text-overflow: ellipsis;
2020
}
2121

22+
.box {
23+
border-radius: 0px;
24+
margin-top: 5px;
25+
}
26+
2227
///// Social Buttons
2328

2429

0 commit comments

Comments
 (0)