config.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /*
  3. *
  4. * Application Name: PHP Custom Content Uploader
  5. * Module Name: config.php
  6. *
  7. * Copyright (c) 2020 DBMXPCA Technologies. All rights reserved.
  8. * https://www.dbmxpca.com/
  9. *
  10. */
  11. // Description: Fully Qualified Domain Name (FQDN), with no trailing slash. Do not include the protocol (i.e.: HTTP or HTTPS).
  12. // Default Example: "ugc.example.com"
  13. define("FQDN", "ugc2.dbmxpca.com");
  14. // Description: HTTP protocol to use. Use "http" for plain-text HTTP or "https" for HTTP Secure protocol.
  15. // Default Example: "ugc.example.com"
  16. define("HTTP_PROTOCOL", "https");
  17. // Description: The public URL path to the UCD. For example, by default this is "/u" (short for "/users"). This value is appended to the FQDN to determine the final image path. For example, with the default configuration, an image path could be: "https://ugc.example.com/u/13940/3198590318.png". Otherwise if you set the setting to something like "/users" then an image path could be "https://ugc.example.com/users/13940/3198590318.png". Without any URL-Rewrite or mod_rewrite modules, this would usually correspond to the setting "USER_CONTENT_DIR" found below.
  18. // Default: "/u"
  19. define("PUBLIC_USER_CONTENT_DIR", "/u");
  20. // Description: Full filesystem path to the root of the user content directory. Must be writeable by the script. Do not include trailing slash.
  21. // Default: $_SERVER['DOCUMENT_ROOT'] . "/u"
  22. // Default Example: "https://ugc.dbmxpca.com/u/13940/3198590318.png"
  23. define("USER_CONTENT_DIR", $_SERVER['DOCUMENT_ROOT'] . "/u");
  24. // Description: Allowed MIME types.
  25. // Default: array('image/png', 'image/jpeg', 'image/gif', 'video/webm');
  26. $allowed_mime_types = array('image/png', 'image/jpeg', 'image/gif', 'video/webm');
  27. // Description: Full path, including name of the user's JSON.
  28. // Default: "/u"
  29. // Default Example: "https://ugc.dbmxpca.com/u/13940/3198590318.png"
  30. define("USERS_JSON", $_SERVER['DOCUMENT_ROOT'] . "/users.json");
  31. // Description: If true, API keys are case-sensitive: requests will only succeed if requesting with the API key with correct case (i.e.: "PaSSword123" != "password123").
  32. // Default: false
  33. // Default Example: "https://ugc.dbmxpca.com/u/13940/3198590318.png"
  34. define("FORCE_CASE_SENSITIVE_API_KEYS", false);
  35. // define("FORCE_CASE_SENSITIVE_API_KEYS", true);
  36. // Description: If true, errors will be returned enclosed with <pre></pre> tags.
  37. // Default: true
  38. define("ENCLOSE_ERRORS_WITH_PRE_TAG", true);
  39. // define("ENCLOSE_ERRORS_WITH_PRE_TAG", false);
  40. // Description: If true, errors will be detailed. Otherwise, errors will be vague for security reasons. This can be enabled for debugging or troubleshooting purposes.
  41. // Default: true
  42. define("DETAILED_ERRORS", true);
  43. // define("DETAILED_ERRORS", false);
  44. // Description: Random length of a default random string. Currently unused.
  45. // Default: 10
  46. define("RANDOM_STRING_DEFAULT_LENGTH", 10);