File tree Expand file tree Collapse file tree
components/modals/DriveItemInfoModal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ function DriveItemInfoModal(): JSX.Element {
101101 {
102102 dbItemId : dbItem ?. id || item . id ,
103103 id : isFolder ? item . id . toString ( ) : ( item . fileId as string ) ,
104+ uuid : item ?. uuid ,
104105 type : isFolder ? 'folder' : 'file' ,
105106 } ,
106107 ] ,
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ export async function uploadFile(
5757
5858 return await uploadPromise ;
5959 } catch ( err ) {
60- console . warn ( `Upload attempt ${ attempt } of ${ MAX_TRIES } failed:` , err ) ;
6160 logger . error ( `Upload attempt ${ attempt } of ${ MAX_TRIES } failed:` , err ) ;
6261
6362 const lastTryFailed = attempt === MAX_TRIES ;
Original file line number Diff line number Diff line change @@ -84,8 +84,16 @@ class DriveTrashService {
8484 return this . sdk . trash . clearTrash ( ) ;
8585 }
8686
87- public async moveToTrash ( items : { id : number | string ; type : 'folder' | 'file' } [ ] ) {
87+ public async moveToTrash ( items : { id : number | string ; type : 'folder' | 'file' ; uuid ?: string } [ ] ) {
8888 const itemsToMove = items . map ( ( item ) => {
89+ if ( item . uuid !== undefined ) {
90+ return {
91+ id : null ,
92+ uuid : item . uuid ,
93+ type : item . type ,
94+ } ;
95+ }
96+
8997 return {
9098 id : item . id ,
9199 type : item . type ,
Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ export const clearTrash = async (): Promise<UseCaseResult<null>> => {
181181 * Moves items to trash
182182 */
183183export const moveItemsToTrash = async (
184- items : { id : string ; type : 'file' | 'folder' ; dbItemId : number } [ ] ,
184+ items : { id : string ; type : 'file' | 'folder' ; dbItemId : number ; uuid ?: string } [ ] ,
185185 onUndo : ( ) => void ,
186186) : Promise < UseCaseResult < null > > => {
187187 try {
You can’t perform that action at this time.
0 commit comments