0

I'm trying to implement GCDWebUploader in my iOS app. I want to disable 'Move Items' and 'Create Folder' options. How can I do that?

Mohit
  • 45
  • 2
  • 10

2 Answers2

0

You can do it by editing GCDWebUploader.m Class . Go to Pods>GCDWebServer>GCDWebUploader>GCDWebUploader.m you will see following function .enter image description here

Edit function as your requirement. for example I don't want let user to create new folder then i need to change in following functions:

- (BOOL)shouldCreateDirectoryAtPath:(NSString*)path {
         return NO;
    }

if you face following warning just click unlock :

enter image description here

Return Zero
  • 424
  • 4
  • 15
0

Instead of using GCDWebUploader class directory, create a subclass called MyWebUploader and override -shouldMoveItemFromPath:toPath: and -shouldCreateDirectoryAtPath: to return NO.

Pol
  • 3,848
  • 1
  • 38
  • 55