Method: Wpxf::Utility::BodyBuilder#add_file_from_string
- Defined in:
- lib/wpxf/utility/body_builder.rb
#add_file_from_string(name, value, remote_name) ⇒ Hash
Add a file to the field list that will upload a specific string as its file contents, rather than reading from disk.
38 39 40 41 42 43 44 |
# File 'lib/wpxf/utility/body_builder.rb', line 38 def add_file_from_string(name, value, remote_name) @fields[name] = { type: :mem_file, value: value, remote_name: remote_name } end |