Skip to content

File Storage #1

@vezenovm

Description

@vezenovm

Storing files in the PostgreSQL database I imagine would require me to do some sort of buffering to account for the possibility of large files. Is there a recommended strategy for dealing with file storage?

What are everyone's thoughts on simply storing the file through a Google Drive cloud service for the moment and rather than hashing the entire file contents in our database we just store a hashed file id?

Also for reference here is my current database schema for the MVP:

create table users (
	user_id				varchar(32)		not null,
	name				varchar(32)		not null,		
	public_address			varchar(42)		unique not null,
	creation_timestamp		timestamp 		not null,
	primary key (user_id)
);

create table letters (
	letter_id			varchar(32)		primary key,
	letter_contents			bytea			not null,
	letter_writer_id		varchar(32)		not null references users(user_id),
	letter_requestor		varchar(32)		not null references users(user_id),
	primary key (letter_id)
);

create table sent_letters (
	user_id					varchar(32) 	        not null references users(user_id),
	letter_id 				varchar(32)		not null references letters(letter_id),
	primary key (user_id, letter_id)
);

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions