Skip to content

File Storage Service

The File Storage Service goal is provide an API to upload and download files, also exposing its metadata information. This microservice implements the TUS Protocol which is an open-source protocol for file uploading built upon HTTP/HTTPS to make it available on every platform.

FileMetadata

A FileMetadata has the following properties:

  1. Name: The name of the file without extension.
  2. Extension: The file extension without the dot.
  3. Size: The size in bytes of the file.
  4. MediaType: The file media type (MIME type).
  5. Created: The date when the entity was created.
  6. Modified: The date when the entity was modified (only the metadata).
  7. ThumbnailId: The correlation id of the associated Thumbnail. Could be null.
  8. Expiration: The date when the file will expire. Could be null.
  9. CurrentState: The file Saga state.

States

  • Created: The File is created but is not completely uploaded.
  • Uploaded: The File is completely uploaded and can be downloaded.
  • UploadedWithThumb: The same as Uploaded and its thumbnail was successfully generated.
  • UploadedWithoutThumb: The same as Uploaded and its thumbnail generation errored.
  • Deleted: The File was deleted by cancelling the upload, manually deleting the file or was deleted by the expiration mechanism.

Note

When we say File deleted we refer physically, not the database entity.

See also