banner



How To Add A Second Dropbox Account

The File Uploads add-on needs to exist installed and activated to see the features mentioned in this this documentation.

  1. Adding and configuring a File Upload pick for your users
  2. Attaching an uploaded file to an electronic mail
  3. Saving uploaded files to Dropbox, Google Drive, or Amazon S3
  4. File Uploads General Settings
  5. Advanced functionality

Adding a File Upload option to your form

A File Uploads field can exist added to the form by clicking on the Add together Field Button on the bottom right, then choosing the File Upload field from the listing.

add new field button choose-the-file-upload-field

Configuring your File Upload field

Click on the File Upload field to open its settings window.
d
File Upload Configuration

General Settings

Label

The name of the field as displayed to your users.

Required Field

If enabled, this field must be completed before the form tin can exist submitted.

Relieve to Server

Enabled past default, this option will save an uploaded file to your server when the form is submitted.

Rename Uploaded File

If you want the file to retain the proper noun your user gave information technology, leave this blank. If you prefer your ain naming convention, you tin can enter it here using the merge tag push button.

There is a {file:extension} merge tag, just that doesn't take to be added to the finish of the setting as it will be added automatically.
The {file:name} and {file:extension} merge tags are only used the field settings and can't be used in actions or other places. Y'all can besides create directories using / in the proper name.

The old mode "shortcodes" are nevertheless supported for renaming and can exist mixed with merge tags. These shortcodes tin can be establish in the expandable section immediately beneath:

Renaming Conventions

%filename% – The file's original filename, with any special characters removed.
%formtitle% – The title of the current class, with whatsoever special characters removed.
%username% – The WordPress username for the user, if they are logged in.
%userid% – The WordPress ID (int) for the user, if they are logged in.
%displayname% – The WordPress displayname for the user, if they are logged in.
%lastname% – The WordPress lastname for the user, if they are logged in.
%firstname% – The WordPress firstname for the user, if they are logged in.
%date% – Today'due south date in yyyy-mm-dd format.
%calendar month% – Today's calendar month in mm format.
%day% – Today's day in dd format.
%year% – Today'southward year in yyyy format.

Salve to Media Library

If this setting is enabled, the File Upload will be saved to the server's Media Library.
You can call up data about the attachment created in the media library using the following merge tags:
{field:my_field_key:attachment_id} – the ID of the attachment
{field:my_field_key:attachment_url} – the URL of the attachment
{field:my_field_key:attachment_embed} – an HTML image of the attachment

Restrictions Settings

Restriction Settings

File Limit

Use this choice to adapt the number of files that be uploaded from this File Upload field.

Maximum File Size

Set the maximum size of the file that can be uploaded here. This setting defaults to MB. Your server besides probable has a maximum file size limit, then if yous set something hither and users even so cannot upload files of that size, contact your host to have the server file size limit increased.

Minimum File Size

Set the minimum size of the file that tin can be uploaded here. This setting defaults to MB

Immune File Types

This setting creates a whitelist of the types of files that can be uploaded by file extension (i.e. .pdf, .jpg, .png, .xls, etc). With information entered into this setting, users volition be able to upload files of that type just.

Brandish Settings

Display Settings

Clarification

Any text entered hither will appear between the label and the field.

Select File Push button Text

Past default, the text that appears on the File Uploads button when viewing the form volition read "Select Files". That tin be changed to whatever y'all like hither.

Show Advanced Features

To see these features, you will demand to enable Developer Manner in Ninja Forms' settings.

Display Settings

Custom Class Names

  • Container: Text entered hither applies a custom HTML course to this field's wrapper
  • Element: Text entered here applies a custom HTML class to this field's element

Assist Text

Entering text hither will display an informational icon next to the field label. When a user hovers over it, a pocket-size window will announced containing this text.

Advanced Settings

Label Position

Changes the orientation of the field characterization relative to the field element (higher up, below, left, right, subconscious)

Administration Settings

Field Cardinal

A unique programmatic key that tin be used to identify and target your field for custom development. One is generated for each field automatically, and this is what you see pre-populated in the setting. It can be changed, though doing so will not update information technology in anything you've already written.


[Jump to top]

Attaching an uploaded file to an electronic mail

This can be achieved in two ways, the first method via merge tag, which will then create a link to the file(s) uploaded in the received email.

Sending a download link with the email

  1. From the Emails and Actions tab, edit the email action past clicking on the activity'south gear symbol. From hither, click the merge tag button located in the Email Message line, shown below. Merge tag button 2. Add together in the File Uploads merge tag to the Email Message body by simply clicking on it. Should your list testify many merge tags, and you have trouble locating the correct tag, accept reward of the merge tag search bar and blazon File Uploads to locate the appropriate tag.

Attaching the file(s) to the email

The second method volition attach the file(s) itself to the electronic mail itself.

  1. From the Emails and Deportment tab, edit the email action by clicking on the action'southward gear symbol.
  2. From the pull out drawer, scroll down to the Advanced tab and click to drib downwardly.
  3. Then actuate (click) the Attach File Uploads toggle.

Attach File Uploads toggle


[Jump to meridian]

Saving uploaded files to Dropbox, Google Drive, or Amazon S3

This process requires ii steps: i) adjusting plugin settings and ii) adjusting form settings

1. Setup your plugin settings to ship uploaded files to an external service

Connecting Ninja Forms to Dropbox

To connect Ninja Forms to Dropbox, become to Ninja Forms > File Uploads > External Settings tab and click on the Connect button

Connect to Dropbox settings

Dropbox will create a default directory of Apps/NinjaFormsUploads within your Dropbox account. While this cannot be inverse, you can utilise the File Path setting here to define a custom directory within that file path for this upload field.

Connecting Ninja Forms to Amazon S3

Amazon S3 Settings
  1. Open up the IAM console inside your Amazon S3 account
  2. In the navigation pane, choose Users. Then choose your IAM user name.
  3. Choose the Security Credentials tab and and so choose Create Access Key.
  4. To retrieve your Access Key and Secret Key, cull Prove User Security Credentials.
  5. Choose Download Credentials, and store the keys in a secure location.
  6. Go to Ninja Forms > File Uploads > External Settings tab and enter your Access Key ID and Secret Access Fundamental
  7. Alternatively you lot can define your Access Fundamental ID and Secret Access Key every bit constants in wp-config.php:
    define( 'NF_FU_AMAZON_S3_ACCESS_KEY', 'xxxxxxxxxxxxxx' );  define( 'NF_FU_AMAZON_S3_SECRET_KEY', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx' );
  8. If your saucepan is set as private you will need to add together this code snippet to an mu-plugin file, eg. wp-content/mu-plugins/ninja-forms.php (the mu-plugin directory might need to exist created if it doesn't be):
    <?php   add_filter( 'ninja_forms_uploads_s3_acl', function () {  return NF_FU_External_Services_S3_Service::ACL_PRIVATE;  } );

Connecting Ninja Forms to Google Drive

To connect Ninja Forms to Google Drive, become to Ninja Forms > File Uploads > External Settings tab and click on the Connect button in the 'Google Bulldoze Settings' box.

Connect to Google Drive button

Name the folder you want your file uploads to be stored in using the File Path setting. Whatever y'all blazon here will exist the proper name of the binder in Drive. If you leave this setting blank, files will go straight to your general My Drive area and will non be placed in a folder.

Share with Google Drive
You tin right-click the folder where the files are existence uploaded and click "Share with Google Bulldoze" Then click the advanced settings in the lesser-right and change access to anyone that has the URL.

2. Setup your grade to send uploaded files to an external service

Now that yous have your plugin configured to send to either Dropbox or Amazon S3 (step one), y'all need to add and configure an External File Upload action on the form itself. Open your form and navigate to the Emails & Actions tab, then click the blue circumvolve/+ in the lesser right corner to add a new action.

add new external file upload

Under the External File Upload Activity, you lot can choose the service you lot would like the files from your grade to salvage to.
choose-external-service


[Jump to top]

File Uploads General Settings

Access these settings in your WordPress dashboard under Ninja Forms > File Uploads.

Browser Uploads

the browser uploads tab

This tab allows you to view or delete all uploaded files that accept been saved to your server. You tin sort past course or by engagement.

Upload Settings

the upload settings tab

  • Max File Size (in MB) – The Max File Upload size immune per class.
  • File upload error message – The Error Message that the user receives when the Max File Size is met.
  • Custom Directory – Is used to create dynamic directories.

If you migrate from another server and the File Uploads path is pointing to the older server location, you can deactivate and then reactivate your File Uploads and Ninja Forms plugins to reset the file path.

Advanced Functionality

Please note that modifying your addition with custom lawmaking is outside the telescopic of back up that we are able to provide. However, this department provides solutions to highly specific use cases of File Uploads that may come in handy if you find yourself needing them!

Sending a direct link to the public URL of a file uploaded to External Services

To enable a direct link to the public URL for the uploaded file on Dropbox, Google Bulldoze, or Amazon S3, plow on 'Utilise Public URL' setting in Ninja Forms > File Uploads > External Settings


Allowing file types in File Uploads that are not normally allowed by WordPress

For security purposes, File Uploads only allows the upload of file types that WordPress allows. However, this listing of file types tin exist amended with the 'ninja_forms_upload_mime_types_whitelist' filter.

If Allowed File Blazon is Setup If Immune File Type is not Setup

Add together to functions.php
add_filter( 'ninja_forms_upload_mime_types_whitelist', 'my_ninja_forms_upload_mime_types_whitelist' );
role my_ninja_forms_upload_mime_types_whitelist( $types ) {
//$types['esx'] = 'awarding/octet-stream';
render $types;
}

add_filter( 'ninja_forms_upload_check_mime_types_whitelist', '__return_false' );

Copy & paste both the function and the filter if you set upward the immune file types – File Uploads > Restrictions > Permit File Types – within the File Uploads field of your form.

Include add_filter( 'ninja_forms_upload_mime_types_whitelist', 'my_ninja_forms_upload_mime_types_whitelist' );
role my_ninja_forms_upload_mime_types_whitelist( $types ) {
render $types;
}

Note: The WordPress uploads folder is accessible by default on WordPress installations. To limit access to the WordPress Uploads binder, you may want to use an .htaccess file.

File Upload Add-on Tutorials!

How To Add A Second Dropbox Account,

Source: https://ninjaforms.com/docs/file-uploads/

Posted by: aginpegare.blogspot.com

0 Response to "How To Add A Second Dropbox Account"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel