Handling file uploads with Restler -
what best practice implement file uploads using restler framework?
i have api call file save in cdn , return cdn file url caller. best way implement it?
file upload cdn using our api
this requires 2 steps, first file on api server.
- add
uploadformatsupported formats - adjust static properties of
uploadformatsuit need - from api method use
$_files,move_uploaded_filefile desired folder. step common php upload process.
now have file on server
- upload cdn. can use means provided cdn. can ftp or using sdk upload
- construct cdn url , return client
Comments
Post a Comment