Darshan_Bhandary
Import action column mapping layout
https://filamentphp.com/docs/3.x/actions/prebuilt-actions/import
you can refer this docs
8 replies
I have a Problem in File upload in chunks
This is my custom component
chunked-vedio-upload.blade.php
<div id="resumable-upload-container">
<button id="browseButton">Select File</button>
<div id="fileProgress" style="margin-top: 10px;"></div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/resumable.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
let r = new Resumable({
target: '{{ route("chunked.upload") }}',
query: { _token: '{{ csrf_token() }}' }, // CSRF token
chunkSize: 1 * 1024 * 1024, // 1MB chunks
simultaneousUploads: 3,
testChunks: false,
throttleProgressCallbacks: 1,
});
r.assignBrowse(document.getElementById('browseButton'));
r.on('fileAdded', function (file) {
r.upload();
});
r.on('fileProgress', function (file) {
let progress = Math.floor(file.progress() * 100);
document.getElementById('fileProgress').innerText = `Uploading: ${progress}%`;
});
r.on('fileSuccess', function (file, message) {
document.getElementById('fileProgress').innerText = 'Upload complete!';
});
r.on('fileError', function (file, message) {
document.getElementById('fileProgress').innerText = 'Upload failed!';
});
});
</script>
my filament resource its present in my relationship manager form.
Forms\Components\Field::make('link')
->view('components.chunked-video-upload')->label('Video')
->required(),5 replies