Files Fire is a proof of concept, that uses the new Material-UI version and Firebase in React.
git clone https://github.com/kadukeitor/files-fire.git
cd files-fire
npm install
cp .env.example .env
npm start
- Integrate a mime-type library
- Controlling the number of files that the user can upload.
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId}/{allDocuments=**} {
allow read, update, delete: if request.auth.uid == userId;
allow create: if request.auth.uid != null;
}
}
}
service firebase.storage {
match /b/{bucket}/o {
match /users/{userId}/{allPaths=**} {
allow read: if request.auth.uid == userId;
allow write: if request.auth.uid == userId
&& request.resource.size < 10 * 1024 * 1024;
}
}
}
Check the demo here