Skip to content

StorageController

reference
1 min readUpdated

Kind: Controller

Source: Pams/API/Pams.API/Controllers/StorageController.cs (line 20)

Part of: Pams

Where it refuses work

  • StorageController stops the work with an early return when !Enum.IsDefined(typeof(Pams.API.Helpers.APIStorageManager.StorageFileType), fileType), in 2 places.
  • StorageController stops the work with an early return when !CanView(fileTypeEnum, token), in 2 places.
  • StorageController stops the work with an early return when tokenArr == null || tokenArr.Length < 3.
  • StorageController stops the work with an early return when fileTimeStamp < unixTimeNow.
  • StorageController stops the work with an early return when tokenArr == null || tokenArr.Length < 4.
  • StorageController stops the work with an early return when PersonUserID != userID.

When something fails

  • StorageController handles failure in 2 places: it turns it into a return value in all 2.

Relationships

  • MODULE_DECLARES → GetFile
  • MODULE_DECLARES → PreviewFile
  • MODULE_DECLARES → UploadFile
  • MODULE_DECLARES → SavePDF
  • MODULE_DECLARES → getcc
  • MODULE_DECLARES → getcc
  • IMPORTS → BaseController
  • IMPORTS → StorageFile

Was this page helpful?

Download as PDF