emile 12 months ago
parent e77ce16f32
commit 2d63528c1d

Binary file not shown.

@ -677,15 +677,11 @@ def add_ticket(request, customer_id):
file_paths = request.POST.getlist('filePath')
for file_path in file_paths:
if os.path.exists(file_path):
with open(file_path, 'rb') as f:
ticket_attachment = TicketAttachment(
ticket=ticket,
file_path=file_path
)
ticket_attachment.save()
else:
print("Error: File does not exist at the provided path:", file_path)
ticket_attachment = TicketAttachment(
ticket=ticket,
file_path=file_path
)
ticket_attachment.save()
return redirect('ticketdetails', ticket_number=ticket.ticket_number)

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

@ -54,7 +54,7 @@ class FileUpload {
console.log('File uploaded to:', res.existingPath);
// Add the uploaded file path as an option in the select tag
var option = '<option value="' + res.existingPath + '">' + res.existingPath + '</option>';
var option = '<option value="' + res.existingPath + '" selected>' + res.existingPath + '</option>';
$('#filePathInput').append(option);
}
});

Loading…
Cancel
Save