Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

2.5. Advanced Configuration

Ruben Nine edited this page Aug 14, 2015 · 2 revisions

If you need to enable security or customize store options, please follow the instructions below:

Enabling Security

  • App Secret Key

    • Add @import FPPicker; (iOS) or @import FPPickerMac; (OS X) to your app delegate (i.e., typically AppDelegate.m)

    • Add the following code on your app delegate and use the API Key you got after registering:

      + (void)initialize
      {
          (...)
          [FPConfig sharedInstance].appSecretKey = @"SET_FILEPICKER.IO_APPSECRETKEY_HERE";
          (...)
      }
    NOTE: This setting is required if security is enabled in Developer Portal.

Customizing Store Options

  • Add @import FPPicker; (iOS) or @import FPPickerMac; (OS X) to your app delegate (i.e., typically AppDelegate.m)

    • Add the following code on your app delegate:
    1. Store Access

    Indicates that the file should be stored in a way that allows public access going directly to the underlying file store.

    + (void)initialize
    {
        (...)
        [FPConfig sharedInstance].storeAccess = @"private";
        (...)
    }
    • Valid values are public or private.
    • Defaults to private.
    1. Store Container

    The bucket or container in the specified file store where the file should end up.

    + (void)initialize
    {
        (...)
        [FPConfig sharedInstance].storeContainer = @"some-alt-container";
        (...)
    }
    1. Store Location

    Where to store the file.

    + (void)initialize
    {
        (...)
        [FPConfig sharedInstance].storeLocation = @"S3";
        (...)
    }
    • Valid values are S3, azure, dropbox and rackspace.
    • Defaults to S3.
    1. Store Path

    The path to store the file at within the specified file store.

    For S3, this is the key where the file will be stored at.

    NOTE: For S3, please remember adding a trailing slash to the path (i.e. my-custom-path/)

    + (void)initialize
    {
        (...)
        [FPConfig sharedInstance].storePath = @"some-path-within-bucket/";
        (...)
    }