How to Upload Images?

Some applications, e.g. Instagram, allow you to choose images from your phone’s library, and then put them on the app? Does anyone know how to program this feature using Unity?

I’m trying to make a button saying “Choose Photo from Library”. When you click it, it opens the list of photos on your phone, and allows you to pick one photo. Once you choose one, it displays that photo on the app (preferably as an Image/Raw Image UI Component in Canvas). If someone could point me to a Tutorial or show me a Unity Asset for this, that would be great!

:slight_smile:

1 Like

Native Gallery Assist : Unity Asset Store - The Best Assets for Game Making

If you also want to updlod the image to a webserver you need to use the WWW class like :

var frm = new WWWForm();
frm.AddBinaryData( "fileName", imageBytes );
WWW wwr = new WWW( "urltopostmethodinphpserveroraspnetbackend", frm );
yield www;