file_transfer-with-s3-exporter.conf.example 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ##--------------------------------------------------------------------
  2. ## File Transfer
  3. ##
  4. ## Enables the File Transfer over MQTT feature
  5. ##--------------------------------------------------------------------
  6. ## Note: This is an example of how to configure this feature
  7. ## you should copy and paste the below data into the emqx.conf for working
  8. ## Note: This configuration only works for the EMQX Enterprise version
  9. file_transfer {
  10. ## Enable the File Transfer feature
  11. enable = true
  12. ## Storage backend settings
  13. storage {
  14. ## Local file system backend setting
  15. ## Currently, it's the only available storage backend.
  16. local {
  17. ## Enable the backend
  18. enable = true
  19. ## Segments and temporary files storage settings
  20. segments {
  21. ## Directory where these files are stored
  22. root = "/var/lib/emqx/transfers/segments"
  23. ## Garbage collection settings
  24. gc {
  25. ## How often to run GC
  26. interval = 1h
  27. ## Maximum time to keep parts of incomplete transfers for
  28. maximum_segments_ttl = 24h
  29. }
  30. }
  31. ## S3-compatible object storage exporter
  32. exporter.s3 {
  33. ## Disable the backend
  34. ## Note: Only one backend may be enabled at a time.
  35. enable = true
  36. ## Endpoint of S3 API of the object storage service of your choice
  37. host = "s3.us-east-1.amazonaws.com"
  38. port = 443
  39. ## Credentials to use to authorize with the S3 API
  40. access_key_id = "AKIA27EZDDM9XLINWXFE"
  41. secret_access_key = "..."
  42. ## Which bucket to store transferred files in?
  43. bucket = "my-bucket"
  44. ## TTL of file download URLs exposed through File Transfer API
  45. url_expire_time = 1h
  46. ## Enable the HTTPS
  47. transport_options.ssl.enable = true
  48. ## Timeout for connection attempts
  49. connect_timeout = 15s
  50. ## Attempt to talk through IPv6 first
  51. ipv6_probe = true
  52. }
  53. }
  54. }
  55. }