بنقرة واحدة
umbraco-file-upload-preview
Implement file upload preview components in Umbraco backoffice using official docs
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Implement file upload preview components in Umbraco backoffice using official docs
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Implement UFM (Umbraco Flavored Markdown) components in Umbraco backoffice using official docs
Add a new Umbraco extension project reference to the main Umbraco instance and solution
Understand and use localization in Umbraco backoffice (foundational concept)
Implement property editor UIs in Umbraco backoffice using official docs
Quick setup for Umbraco extension development - creates instance, extension, and registers it
Review checks reference for validating Umbraco backoffice extensions
| name | umbraco-file-upload-preview |
| description | Implement file upload preview components in Umbraco backoffice using official docs |
| version | 1.0.0 |
| location | managed |
| allowed-tools | Read, Write, Edit, WebFetch |
File Upload Previews are custom web components that render previews for specific file types during upload in Umbraco. They allow you to create visual representations for files based on their MIME types, such as displaying thumbnails for images, waveforms for audio, or custom icons for specific file formats.
Always fetch the latest docs before implementing:
umbraco-umbraco-elementexport const manifests: Array<UmbExtensionManifest> = [
{
type: 'fileUploadPreview',
alias: 'My.FileUploadPreview.Custom',
name: 'Custom File Upload Preview',
weight: 100,
element: () => import('./my-file-preview.element.js'),
forMimeTypes: ['application/pdf', 'application/x-pdf'],
},
];
import { html, customElement, property, state } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import type { UmbFileUploadPreviewElement } from '@umbraco-cms/backoffice/media';
@customElement('my-file-preview')
export class MyFilePreviewElement extends UmbLitElement implements UmbFileUploadPreviewElement {
@property({ type: Object })
file?: File;
@state()
private _previewUrl?: string;
override updated(changedProperties: Map<string, unknown>) {
if (changedProperties.has('file') && this.file) {
this._previewUrl = URL.createObjectURL(this.file);
}
}
override disconnectedCallback() {
super.disconnectedCallback();
if (this._previewUrl) {
URL.revokeObjectURL(this._previewUrl);
}
}
override render() {
if (!this.file) return html``;
return html`
<div class="preview-container">
<uui-icon name="icon-document"></uui-icon>
<span>${this.file.name}</span>
</div>
`;
}
}
export default MyFilePreviewElement;
interface ManifestFileUploadPreview extends ManifestElement<UmbFileUploadPreviewElement> {
type: 'fileUploadPreview';
forMimeTypes: string | Array<string>; // e.g., 'image/*', ['image/png', 'image/jpeg']
}
interface UmbFileUploadPreviewElement {
file?: File;
}
image/* - All image typesvideo/* - All video typesaudio/* - All audio typesapplication/pdf - PDF files*/* - Fallback for all types (use with lower weight)That's it! Always fetch fresh docs, keep examples minimal, generate complete working code.