abq-trails / abq-trails-serverside

Apache License 2.0
0 stars 2 forks source link

Research photo storage #27

Open achigbrow opened 5 years ago

achigbrow commented 5 years ago

https://www.callicoder.com/spring-boot-file-upload-download-rest-api-example/

https://www.callicoder.com/spring-boot-file-upload-download-jpa-hibernate-mysql-database-example/

As a rule, we only save small files (if any) in the database itself; other files are saved in the file system, and referenced by columns in the database tables. However, you don't want to put too much detail in those references - e.g. if the database entries store a complete file path, then we have a tough time changing the high-level organization of persistent files in our application if we already have data in the database. In most cases, a model class that includes files will just have fields indicating filetype (a MIME type), size, and filename (just the name and extension itself, not the whole path). (Sometimes we'll also keep a file checksum in the DB.)

achigbrow commented 5 years ago

Not necessary for V1 implementation.