มีโอกาสได้เขียน Feature upload ไฟล์ โดยมี limit size ที่ 2MB ใน input ก็รับ size มาทำเป็น MB ก็เอา size / 1024 / 1024 เขียนเสร็จก็เทสเบื้องต้นไม่เจอปัญหาอะไร ลองอัปไฟล์ 2.5 MB ก็มีโชว์ alert อัปเกิน 2 MB ไปปกติ…
เชื่อว่าทุกคนเคยใช้ async await ใน forEach บ้างแหละ จะไม่มีผลกระทบไรเลย หากผลลัพธ์ที่เราต้องการ ไม่สนใจลำดับขั้นตอนในการแสดงผล
แต่ถ้าเราต้องการแสดงผลที่เป็นลำดับขั้นตอน ลองมาดูโค้ดกับผลลัพธ์ข้างล่างนี้ก่อนครับ ว่าใช้ async…
เชื่อว่า Web Developer หลายคนติดปัญหานี้ แน่นอน วันนี้ก็จะมาขยายความเรื่อง CORS จากบทความก่อนหน้านี้