Skip to content
Branch: master
Find file History
Pull request Compare This branch is 1 commit behind v0.12.x.
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Example - Form File Upload

This example illustrates aah form file upload. It is easy to handle file uploads in aah. It works by calling (method) Req.SaveFile with form field name and destination path. The method returns file size on successful save.

fileSize, err := Req.SaveFile("userProfileImage", "/Users/jeeva/user-profile-uploads")

Get aah examples

git clone aah-examples

Run this example

cd aah-examples/form-fileupload
aah run

Visit this URL

Home page includes the details of implemented functionality and has a button to choose file and upload. It is self explanatory.

You can’t perform that action at this time.