-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathIStorageFileApi.cs
32 lines (31 loc) · 2.59 KB
/
IStorageFileApi.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Supabase.Storage.Interfaces
{
public interface IStorageFileApi<TFileObject>
where TFileObject : FileObject
{
ClientOptions Options { get; }
Task<string> CreateSignedUrl(string path, int expiresIn, TransformOptions? transformOptions = null, DownloadOptions? options = null);
Task<List<CreateSignedUrlsResponse>?> CreateSignedUrls(List<string> paths, int expiresIn, DownloadOptions? options = null);
Task<byte[]> Download(string supabasePath, EventHandler<float>? onProgress = null);
Task<byte[]> Download(string supabasePath, TransformOptions? transformOptions = null, EventHandler<float>? onProgress = null);
Task<string> Download(string supabasePath, string localPath, EventHandler<float>? onProgress = null);
Task<string> Download(string supabasePath, string localPath, TransformOptions? transformOptions = null, EventHandler<float>? onProgress = null);
Task<byte[]> DownloadPublicFile(string supabasePath, TransformOptions? transformOptions = null, EventHandler<float>? onProgress = null);
Task<string> DownloadPublicFile(string supabasePath, string localPath, TransformOptions? transformOptions = null, EventHandler<float>? onProgress = null);
string GetPublicUrl(string path, TransformOptions? transformOptions = null, DownloadOptions? options = null);
Task<List<TFileObject>?> List(string path = "", SearchOptions? options = null);
Task<bool> Move(string fromPath, string toPath);
Task<TFileObject?> Remove(string path);
Task<List<TFileObject>?> Remove(List<string> paths);
Task<string> Update(byte[] data, string supabasePath, FileOptions? options = null, EventHandler<float>? onProgress = null);
Task<string> Update(string localFilePath, string supabasePath, FileOptions? options = null, EventHandler<float>? onProgress = null);
Task<string> Upload(byte[] data, string supabasePath, FileOptions? options = null, EventHandler<float>? onProgress = null, bool inferContentType = true);
Task<string> Upload(string localFilePath, string supabasePath, FileOptions? options = null, EventHandler<float>? onProgress = null, bool inferContentType = true);
Task<string> UploadToSignedUrl(byte[] data, UploadSignedUrl url, FileOptions? options = null, EventHandler<float>? onProgress = null, bool inferContentType = true);
Task<string> UploadToSignedUrl(string localFilePath, UploadSignedUrl url, FileOptions? options = null, EventHandler<float>? onProgress = null, bool inferContentType = true);
Task<UploadSignedUrl> CreateUploadSignedUrl(string supabasePath);
}
}