/// <summary> /// Adds file system uploaded file storage to the application. See <see cref="IUploadedFileStorage" /> for more details. /// </summary> /// <param name="options">The <see cref="IDotvvmOptions" /> instance.</param> /// <param name="tempPath">The absolute or relative path to directory where to store temporary files.</param> public static IDotvvmOptions AddUploadedFileStorage(this IDotvvmOptions options, string tempPath) => options.AddUploadedFileStorage(tempPath, TimeSpan.FromMinutes(30));
/// <summary> /// Adds file system temporary file storages to the application. See <see cref="IUploadedFileStorage" /> /// and <see cref="IReturnedFileStorage" /> for more details. /// </summary> /// <param name="options">The <see cref="IDotvvmOptions" /> instance.</param> /// <param name="tempPath">The absolute or relative path to directory where to store temporary files.</param> /// <param name="autoDeleteInterval">The interval to delete the temporary files after.</param> public static IDotvvmOptions AddDefaultTempStorages(this IDotvvmOptions options, string tempPath, TimeSpan autoDeleteInterval) { return(options .AddUploadedFileStorage(Path.Combine(tempPath, "uploadedFiles"), autoDeleteInterval) .AddReturnedFileStorage(Path.Combine(tempPath, "returnedFiles"), autoDeleteInterval)); }