@@ -145,6 +145,7 @@ export interface StorageAdapter {
145
145
* The PUT method should fail if the file already exists.
146
146
* @param key - The key of the file to be uploaded e.g. "uploads/file.txt"
147
147
* @param expiresIn - The expiration time in seconds for the presigned URL
148
+ * @param contentType - The content type of the file to be uploaded
148
149
*/
149
150
getUploadSignedUrl ( key : string , contentType : string , expiresIn ?: number ) : Promise < string > ;
150
151
@@ -157,20 +158,23 @@ export interface StorageAdapter {
157
158
158
159
/**
159
160
* This method should mark the file for deletion.
161
+ * If file is marked for delation and exists more then 24h (since creation date) it should be deleted.
162
+ * This method should work even if the file does not exist yet (e.g. only presigned URL was generated).
160
163
* @param key - The key of the file to be uploaded e.g. "uploads/file.txt"
161
164
*/
162
165
markKeyForDeletation ( key : string ) : Promise < string > ;
163
166
164
167
165
168
/**
166
- * This method should return the list of files in the storage.
167
- * @param key
169
+ * This method should mark the file to not be deleted.
170
+ * This method should be used to cancel the deletion of the file if it was marked for deletion.
171
+ * @param key - The key of the file to be uploaded e.g. "uploads/file.txt"
168
172
*/
169
173
markKeyForNotDeletation ( key : string ) : Promise < string > ;
170
174
171
175
172
176
/**
173
- * THis method can start needed schedullers, cron jobs, etc. to clean up the storage.
177
+ * This method can start needed schedullers, cron jobs, etc. to clean up the storage.
174
178
*/
175
179
setupLifecycle ( ) : Promise < void > ;
176
180
0 commit comments