Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@filerobot/explorer
Advanced tools
Filerobot explorer for the files uploaded on filerobot, handling them & upload new files.
@filerobot/explorer
The file Explorer and media gallery plugin of the Filerobot Media Asset Widget.
The plugin can be installed from NPM as @filerobot/explorer
npm install --save @filerobot/explorer
then
import Explorer from '@filerobot/explorer'
...
...
...
filerobot.use(Explorer, optionsObject)
If installed via a CDN link, the plugin is inside the Filerobot
global object as Filerobot.Explorer
const Explorer = window.Filerobot.Explorer
...
...
...
filerobot.use(Explorer, optionsObject)
import '@filerobot/core/dist/style.css'
import '@filerobot/explorer/dist/style.css'
or via the minified versions
import '@filerobot/core/dist/style.min.css'
import '@filerobot/explorer/dist/style.min.css'
The plugin's css file should be imported after the Core's css file for having the styles shown correctly.
The Explorer supports multiple options to customize the plugin according to your needs. Required attributes are marked with (required).
An example configuration is provided below:
{
config: {
companyName: 'scaleflex',
foldersLimit: 200,
filesLimit: 50,
rootFolderPath: '/',
tagging: {
language: 'en',
confidence: 60,
key: '',
limit: 10,
provider: 'google',
suggestionList: [
'Alligator',
'Bask',
'Crocodilian',
'Death Roll'
]
}
},
inline: false,
target: '#filerobot-container',
trigger: '#filerobot-trigger-button',
width: 750,
height: 500,
thumbnailWidth: 280,
thumbnailHeight: 180,
waitForThumbnailsBeforeUpload: false,
showProgressDetails: true,
hideUploadButton: false,
hideSearch: false,
hideRetryButton: false,
hideCancelButton: false,
note: null,
closeModalOnClickOutside: false,
closeAfterFinish: false,
closeUploadPanelAfterFinish: false,
disableStatusBar: false,
disableInformer: false,
disableThumbnailGenerator: false,
disablePageScrollWhenModalOpen: true,
animateOpenClose: true,
onRequestCloseModal: () => this.closeModal(),
locale: default,
browserBackButtonCloseModal: false,
theme: 'light',
viewType: 'grid',
showFolderTree: false,
showDetailsView: false,
contextMenuSubTabs: {
fileMore: ['META', 'TAGS', 'EMBED', 'VISIBILITY', 'VERSIONING', 'VARIANTS'],
fileShare: ['SHARE_ASSETS', 'GET_LINK']
},
resetAfterClose: false
}
config: object
(required)default: null
The config objects contains the main configuration for the plugin to interact with your Filerobot project:
scaleflex
200
50
/
60
10
google
inline: boolean
(optional)default: false
If set to true
, the plugin will be displayed as inline element in the element referred by the target property. Otherwise, it will pop up in a modal upon trigger, see below.
trigger: string
(optional)default: null
The selector used for triggering the display of the plugin modal, if passed to querySelectorAll
function. Available options:
body
#filerobot-trigger-button
or .filerobot-trigger-button
Multiple triggers are supported as click events.
required if
inline: false
target: string
(required)default: body
The selector used for displaying the plugin, if passed to querySelector
function. Options:
body
#filerobot-container
or .filerobot-container
width: integer|string
(optional)default: 700
Width of the plugin as a number if specified in pixels or a percentage, eg. '50%'
height: integer|string
(optional)default: 500
Height of the plugin as a number if specified in px
or a percentage eg. '35%'
thumbnailWidth: integer
(optional)default: 280
Pixel width of the asset thumbnails displayed in the gallery. Apect ratio of images is kept in case of image assets.
thumbnailHeight: integer
(optional)default: 170
Pixel height of the asset thumbnails displayed in the gallery. Apect ratio of images is kept in case of image assets.
waitForThumbnailsBeforeUpload: boolean
(optional)default: false
If set to true
, delays the start of the upload process until the asset thumbnails are generated and displayed in the plugin.
showProgressDetails: boolean
(optional)default: true
If set to false
, hides the upload progress bar.
hideUploadButton: boolean
(optional)default: false
If set to true
, hides the Upload button at the top of the plugin.
hideSearch: boolean
(optional)default: false
If set to true
, hides Search field at the top of the plugin.
hideRetryButton: boolean
(optional)default: false
If set to true
, hides the Retry button that can be used to retry an upload in case of failing upload.
hideCancelButton: boolean
(optional)default: false
If set to true
, hides the Cancel used to cancel an upload.
note: string
(optional)default: null
A custom note displayed in the upload screen.
closeModalOnClickOutside: boolean
(optional)default: false
If set to true
, plugin modal will be closed when clicking outside of the modal.
only relevant if
inline: false
closeAfterFinish: boolean
(optional)default: false
If set to true
, modal will close after upload is finished.
closeUploadPanelAfterFinish: boolean
(optional)default: false
If set to true
, the upload panel will be closed automatically and explorer would be shown.
only relevant if
inline: false
onClickDoneButton: function
(optional)default: () => {}
A callback function that would be triggered when the user clicks on done button that is shown in the top left buttons of topbar after finish uploading
Only relevant if closeAfterFinish: false` to be able to see the done button.
disableStatusBar: boolean
(optional)default: false
If set to true
, disables the status-bar plugin which shows the upload/download progress.
disableInformer: boolean
(optional)default: false
If set to true
, disables the informer plugin used to show warnings and errors.
disableThumbnailGenerator: boolean
(optional)default: false
If set to true
, disables the thumbnail-generator plugin that generates image thumbails.
disablePageScrollWhenModalOpen: boolean
(optional)default: true
If set to true
, disables scrolling for the document while the plugin modal is open.
only relevant if
inline: false
(optional)
onRequestCloseModal: () => undefined
(optional)default: closeModal
function
Specified a custom function to be executed when trying to close the modal.
default closing modal behavior is overriden
animateOpenClose: boolean
(optional)default: true
If set to false
, disable the modal's opening and closing.
only relevant if
inline: false
locale: object
(optional)default: locales from filerobot's backend then default locale file with all labels is under lib/defaultLocale.js
.
You can override some labels by specifying a translation object here, such as:
{
strings: {
baseFolderTitle: 'Root' // overrides the default Home value to Root
}
}
theme: string
(optional)default: 'light'
browserBackButtonCloseModal: boolean
(optional)default: false
If set to true
, the browser Back button will close the modal, otherwise it will trigger the standard back browser behavior.
only relevant if
inline: false
viewType: string
(optional)default: grid
Specified the default view for the asset list:
The user will be able to switch between views from the view selector icon in the top bar.
showFolderTree: boolean
(optional)default: false
If set to true
, shows the folder tree will in the left bar of the plugin for the user to navigate folders. The user can show / hide the folder tree from the view switcher icon in the top bar.
showDetailsView: boolean
(optional)default: false
If set to true
, shows the asset details view on the right bar of the plugin for the user to view various details about selected assets. The user can show / hide the details view switcher icon in the top bar.
contextMenuSubTabs: object
(optional)default:
{
fileMore: ['META', 'TAGS', 'EMBED', 'VISIBILITY', 'VERSIONING', 'VARIANTS'],
fileShare: ['SHARE_ASSETS', 'GET_LINK']
}
If you need to customize the sub tabs that are opened from the parent tabs of the context menu (the menu shown on clicking right click on the file/folder):
['META', 'TAGS', 'EMBED', 'VISIBILITY', 'VERSIONING', 'VARIANTS']
.['SHARE_ASSETS', 'GET_LINK']
.videoTranscoding: object
(optional)default:
{
resolution: 'auto',
protocol: 'HLS'
}
Video transcoding options for post-upload video transcoding:
auto
.HLS
.imagePreviewBackground: object
(optional)default:
{
type: 'solid',
color: 'auto'
},
Image preview background options for adding background to images :
solid | blur
, defaults to solid
.auto
.blur
FAQs
Filerobot explorer for the files uploaded on filerobot, handling them & upload new files.
The npm package @filerobot/explorer receives a total of 1,394 weekly downloads. As such, @filerobot/explorer popularity was classified as popular.
We found that @filerobot/explorer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.