File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,10 @@ def bulk_ai_tags_remove(file_ids = [], ai_tags = [])
116116 @file . batch_ai_tags_remove ( file_ids , ai_tags )
117117 end
118118
119+ def copy_file ( source_file_path , destination_path )
120+ @file . copy ( source_file_path , destination_path )
121+ end
122+
119123 def phash_distance ( first , second )
120124 # Get hamming distance between two phash(image hash) to check
121125 # similarity between images
Original file line number Diff line number Diff line change @@ -142,6 +142,12 @@ def batch_ai_tags_remove(file_ids, ai_tags)
142142 @req_obj . request ( 'post' , url , @req_obj . create_headers , payload )
143143 end
144144
145+ def copy ( source_file_path , destination_path )
146+ url = "#{ constants . BASE_URL } /copy"
147+ payload = { 'sourceFilePath' : source_file_path , 'destinationPath' : destination_path }
148+ @req_obj . request ( 'post' , url , @req_obj . create_headers , payload )
149+ end
150+
145151 def validate_upload_options ( options )
146152
147153 # Validates upload value, checks if params are valid,
You can’t perform that action at this time.
0 commit comments