File Export - Export a File using a simple HTML Widget

Using the Export widget, can turn any <button>, <input type="button">, or <a> tag into a cloud-enabled save button.

<button data-fp-mimetype="image/png" data-fp-url="https://www.filestack.com/themes/filestack/assets/images/docs/payphone.png">Save File</button>

Additional Options

widget_options
An optional dictionary of parameters that specify how the export widget behaves.
URL
String
data-fp-url

Required The url of the content you want the user to save.

Suggested File Name
String
data-fp-suggestedFilename

Provide a recommended file name. The user can change this in the interface.

API Key
String
data-fp-apikey

Your API key. If you've already called filepicker.setKey() elsewhere in your code, this isn't needed

Button Text
String
data-fp-button-text

The text to show on the button. Defaults to "Pick File".

Button Class
String
data-fp-button-class

The class(es) to be applied to the button for styling, for example "btn btn-primary"

Mimetype
String
data-fp-mimetype

The mimetype of the content you want the user to save. This is used to suggest a filename and prevent the file from being saved to services that don't support it (Sending text to Facebook, for instance).

Extension
String
data-fp-extension

The extension of the content you want the user to save. Like mimetype, this is used to suggest a filename and prevent the file from being saved to services that don't support it (Sending text to Facebook, for instance). You cannot use both extension and mimetype at the same time.

Container
String
data-fp-container

How to load the Filestack dialog. Possible values are "window", "modal", or the id of an iframe in the current document. Defaults to "modal". Using "window" will launch the dialog in its own browser window.

Services
String
data-fp-service
data-fp-services

Only allow the user to select a file from the services given by name. For example data-fp-services="BOX". Or in order to allow multiple services, provide a list. The list of services to limit selections from by name. The services will be shown in the provided order. An example value might be "BOX,COMPUTER,FACEBOOK". The list of available services for export is.

  • BOX
  • COMPUTER
  • DROPBOX
  • EVERNOTE
  • FACEBOOK
  • FLICKR
  • FTP
  • GOOGLE_DRIVE
  • SKYDRIVE
  • PICASA
  • SEND_EMAIL
  • ALFRESCO
  • CLOUDDRIVE
  • IMGUR
  • CLOUDAPP

Default Service
String
data-fp-openTo

Open the Filestack dialog directly to the service set with data-fp-openTo. For example "BOX" will open the picker to Box.

Custom CSS
String
data-fp-custom-css

Allow a user to set a custom CSS file to load for the Filestack dialog by providing the https publicly accessible url for a CSS file. This can be unique to each dialog instance. You can also set a CSS file to load with the Filestack dialog in the developer portal as a global setting that is applied everytime the dialog is loaded using your API key.

Policy
String
data-fp-policy
Signature
String
data-fp-signature

The HMAC-SHA256 Filestack security signature. Read more about security and how to generate policies and signatures

OnChange
String
onchange

When the dialog finishes uploading the file, the javascript code in the onchange field will be run with a special 'event' variable. The variable has a fpfile or fpfiles (for multiple mode) attribute with information about the uploaded files (jQuery users: look under event.originalEvent).