RepositoryControllerCreateUploadToken Method

Generate new upload token and create file in document repository

Definition

Namespace: FileHold.DocumentRepository
Assembly: FileHold.DocumentRepository (in FileHold.DocumentRepository.dll) Version: 17.1.0.0
C#
[WebMethodAttribute(Description = "Generate new upload token and create file in document repository")]
public Guid CreateUploadToken(
	long fileSize
)

Parameters

fileSize  Int64
file size

Return Value

Guid
new id of created file

Remarks

1. input � file size 2. choose locations where the file can be stored (those that have enough free space for the file); dynamically checking free space in each location (do not save it statically in case that more than one location may be located on one data source) 3. if there are no such locations return error �not enough space in the repository� 4. select to which of the locations the file will be saved (the algorithm might be to prefer to have similar % space used in all location but other rules can be implemented too) 5. generate an unused RepFileId of the file 6. create empty file in location specified by RepFileId 7. add RepFileId to PendingFileLocations table 8. return RepFileId

See Also