- Published on
จะส่ง base64 ให้เป็น file ทำยังไง
- Authors
- Name
- Somprasong Damyos
- @somprasongd
จะส่ง base64 ให้เป็น file ทำยังไง
พอดีว่ามีโปรเจคหนึ่งที่ต้องเก็บไฟล์ PDF เอาไว้ในฐานข้อมูลในรูปแบบของ Base64 แต่ตอนเรียกดูผ่าน API ดันต้องส่งกลับไปเป็นไฟล์แทน แล้วเราต้องทำยังไง
โดยในบทความนี้จะใช้ตัวอย่างโค้ดเป็นภาษา Go
ตัวอย่างไฟล์ PDF ในรูปแบบ Base64
var b64 = `JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoVW50aXRsZWQgZG9jdW1lbnQpCi9Qcm9kdWNlciAoU2tpYS9QREYgbTEwOCBHb29nbGUgRG9jcyBSZW5kZXJlcik+PgplbmRvYmoKMyAwIG9iago8PC9jYSAxCi9CTSAvTm9ybWFsPj4KZW5kb2JqCjYgMCBvYmoKPDwvRmlsdGVyIC9GbGF0ZURlY29kZQovTGVuZ3RoIDMzMT4+IHN0cmVhbQp4nKVS7UoDMRD8n6fICzTdr2R3QYRKtb+VewO1BaE/rO8PJtdLr2jFipfjLmTYndnJYIS6Flg/6hSf9+E9JM3jaf/XQ4xtPW3icXPYheWG4+4jNNywRIRc4uE1bMPjlw5K7a09poq7ISwfJKKk0h6NwzZgV0HZEgKqxUVybLhbHPahgbVA2cgwDi/xBkTsNg5vwRN4hkJcOxyBIiOwSKAGzCJ6gvJqhLSSFNJR5VQDI2BJiQtqmStyB7hqkZnF88RCdUtN56lX/oGEOzshnwtWns7FSQnPyGkEEBJxlUU4I3346qAXm8ndR+B+OBqd/2i0ShJEz/rdcAD+X2tLYuxMF1ozT+NUuwoI9XGAtDuQTUhn/4FOg15IXOWvsaBMfnXyzJIhc74measuShxJcL5h0Z5JVKCza8nrKUYO9bqYfg+erOf5PgEqnsCyCmVuZHN0cmVhbQplbmRvYmoKMiAwIG9iago8PC9UeXBlIC9QYWdlCi9SZXNvdXJjZXMg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SNoJLQXKgkQ2f+9evN1Q/6W8WiPpJaiErITNVjobre6Gmjh0LHTXkvytzrhLwhX+IWXy8xUvJyrhI5h7UObxcNPmRXfr8zH3dHCmVuZHN0cmVhbQplbmRvYmoKNSAwIG9iago8PC9UeXBlIC9Gb250Ci9TdWJ0eXBlIC9UeXBlMAovQmFzZUZvbnQgL0JBQUFBQStBcmlhbE1UCi9FbmNvZGluZyAvSWRlbnRpdHktSAovRGVzY2VuZGFudEZvbnRzIFsxNSAwIFJdCi9Ub1VuaWNvZGUgMTYgMCBSPj4KZW5kb2JqCnhyZWYKMCAxNwowMDAwMDAwMDAwIDY1NTM1IGYgCjAwMDAwMDAwMTUgMDAwMDAgbiAKMDAwMDAwMDU0NiAwMDAwMCBuIAowMDAwMDAwMTA4IDAwMDAwIG4gCjAwMDAwMTIwNTEgMDAwMDAgbiAKMDAwMDAyMDA0NiAwMDAwMCBuIAowMDAwMDAwMTQ1IDAwMDAwIG4gCjAwMDAwMDA3NjQgMDAwMDAgbiAKMDAwMDAwMDgxOSAwMDAwMCBuIAowMDAwMDAwODY2IDAwMDAwIG4gCjAwMDAwMTEwMTQgMDAwMDAgbiAKMDAwMDAxMTI1MyAwMDAwMCBuIAowMDAwMDExNjcwIDAwMDAwIG4gCjAwMDAwMTIxODkgMDAwMDAgbiAKMDAwMDAxOTIyMSAwMDAwMCBuIAowMDAwMDE5NDU3IDAwMDAwIG4gCjAwMDAwMTk3MzEgMDAwMDAgbiAKdHJhaWxlcgo8PC9TaXplIDE3Ci9Sb290IDggMCBSCi9JbmZvIDEgMCBSPj4Kc3RhcnR4cmVmCjIwMTg1CiUlRU9G`
วิธีการนั้นไม่ยากเลย เพียงแค่ส่งเป็น []byte กลับไป พร้อมกับกำหนด Content-Type เป็น application/pdf
ก็ได้แล้ว โดยในตัวอย่างจะใช้ fiber
func main() {
app := fiber.New()
app.Get("/", func(c *fiber.Ctx) error {
c.Set(fiber.HeaderContentType, fiber.MIMETextHTML)
tmpl := `<a href="/file">View PDF</a>`
return c.SendString(tmpl)
})
app.Get("/file", func(c *fiber.Ctx) error {
dec, err := base64.StdEncoding.DecodeString(b64)
if err != nil {
return err
}
c.Set("Content-Type", "application/pdf")
return c.Send(dec)
})
app.Listen(":3000")
}
ลองรันโค้ดดู
เมื่อกดที่ View PDF จะเห็นว่า Browser นั้นเปิดไฟล์ PDF ของเราให้เลย
แต่ถ้าหาก เราต้องการให้ browser ดาวน์โหลดไฟล์แทน เพียงแค่เพิ่มระบุ Response Header Content-Disposition
เพิ่มเข้าไปแบบนี้
func main() {
app := fiber.New()
app.Get("/", func(c *fiber.Ctx) error {
c.Set(fiber.HeaderContentType, fiber.MIMETextHTML)
tmpl := `<a href="/file">View PDF</a>
<br><br>
<a href="/download">Download PDF</a>`
return c.SendString(tmpl)
})
app.Get("/download", func(c *fiber.Ctx) error {
dec, err := base64.StdEncoding.DecodeString(b64)
if err != nil {
return err
}
c.Set("Content-Disposition", `attachment; filename="mypdf.pdf"`)
c.Set("Content-Type", "application/pdf")
return c.Send(dec)
})
// ...
}
เมื่อลองรันโค้ดดู เมื่อกด Download PDF ตัว browser จะทำการดาวน์โหลดให้แล้ว
ซึ่งวิธีการนี้สามารถใช้ได้กับไฟล์ชนิดอื่นๆ ได้อีกด้วยนะ