mirror of
https://github.com/frappe/lms.git
synced 2026-05-02 13:39:31 +03:00
test: course package export and import
This commit is contained in:
@@ -184,11 +184,8 @@ const exportCourse = async () => {
|
||||
}
|
||||
|
||||
const blob = await response.blob()
|
||||
|
||||
// Extract filename from header if present
|
||||
const disposition = response.headers.get('Content-Disposition')
|
||||
let filename = 'course.zip'
|
||||
|
||||
if (disposition && disposition.includes('filename=')) {
|
||||
filename = disposition.split('filename=')[1].replace(/"/g, '')
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ const uploadFile = (e: Event) => {
|
||||
|
||||
const importZip = () => {
|
||||
if (!zip.value) return
|
||||
call('lms.lms.api.import_course_as_zip', {
|
||||
call('lms.lms.api.import_course_from_zip', {
|
||||
zip_file_path: zip.value.file_url,
|
||||
})
|
||||
.then((data: any) => {
|
||||
|
||||
Reference in New Issue
Block a user