fix(fe/be file upload): added track type to file upload
This commit is contained in:
parent
472466bcea
commit
b90bd2f944
2 changed files with 3 additions and 1 deletions
|
@ -125,7 +125,7 @@ class RabbitMQSender
|
||||||
$options = new stdClass();
|
$options = new stdClass();
|
||||||
|
|
||||||
if ($fileTrackTypeId) {
|
if ($fileTrackTypeId) {
|
||||||
$fileTrackType = TrackType::whereId($fileTrackTypeId);
|
$fileTrackType = TrackType::whereId($fileTrackTypeId)->firstOrFail();
|
||||||
$options->analyze_cue_points = $fileTrackType->analyze_cue_points;
|
$options->analyze_cue_points = $fileTrackType->analyze_cue_points;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,11 +29,13 @@ const filesUploading = reactive({
|
||||||
const uploadFiles = () => {
|
const uploadFiles = () => {
|
||||||
selectedFiles.value.forEach( async (el, key) => {
|
selectedFiles.value.forEach( async (el, key) => {
|
||||||
//ToDo: check if a track already exists
|
//ToDo: check if a track already exists
|
||||||
|
|
||||||
filesUploading.is_uploading = true
|
filesUploading.is_uploading = true
|
||||||
selectedFiles.value[key].id = 0
|
selectedFiles.value[key].id = 0
|
||||||
|
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('file', el)
|
formData.append('file', el)
|
||||||
|
formData.append('track_type_id', selectedTrackType.value.id)
|
||||||
const response = await uploadItem(formData);
|
const response = await uploadItem(formData);
|
||||||
console.log(response)
|
console.log(response)
|
||||||
selectedFiles.value[key].id = response.id;
|
selectedFiles.value[key].id = response.id;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue