Upload Sources

  • This is for the version 3.x of the widget. If you're looking for the widget v2 docs, check here
  • Here’s how you migrate from v2 to v3.

In many cases, local storage is not the best place to put your files. That is why Uploadcare implements over a dozen upload sources, so your users would not have to use their device storage if they aren’t keeping any files there.

Our file uploader, Uploadcare Widget, uses the tabbed navigation to switch between upload sources. You can upload media from local and cloud storage, URLs, social media, and many more. The complete list follows.

In the widget options, upload sources are controlled as separate tabs, and the set of enabled tabs is controlled via the data-tabs option.

The quickest way to play with the tab settings would be through Widget Configurator. You can also share live config settings: the changes you implement will modify the configurator URL. This reference, for instance, navigates you to the widget configured to use file, camera, and url upload sources only.

Upload Sources Supported by the Widget 3.x

Code

File Source

Default

file

Local disk

On

camera

Local webcam

On

url

Any URL

On

facebook

Facebook

On

gdrive

Google Drive

On

gphotos

Google Photos

On

dropbox

Dropbox

On

instagram

Instagram

On

evernote

Evernote

On

flickr

Flickr

On

onedrive

OneDrive

On

box

Box

Off

vk

VK

Off

huddle

Huddle

Off

Configuring Upload Sources

You can configure the set of upload sources globally or per widget instance. The widget option controlling the set of available sources globally is called UPLOADCARE_TABS; locally you can do it via the data-tabs attribute.

In both cases, you provide a string holding space-separated list of tab names you want to enable in the widget UI.

Configuring the set of sources globally,

<script>
  UPLOADCARE_TABS = 'url file facebook';
</script>

Configuring the list of sources locally,

<input type="hidden" role="uploadcare-uploader" name="my_file"
  data-tabs="url file facebook"
/>

Questions?

We’re always happy to help with code, integration, and other stuff.
Search our site for more info or post your question in our Community Area.