# Uploading Images - ByteArrays or Php?

**URL:** <https://forum.kirupa.com/t/uploading-images-bytearrays-or-php/280819>\
**Category:** flash\
**Created:** [February 1, 2009, 7:13pm UTC](https://forum.kirupa.com/t/uploading-images-bytearrays-or-php/280819 "2009-02-01T19:13:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dail](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@dail](https://forum.kirupa.com/u/dail)\
**Post date:** [February 1, 2009, 7:13pm UTC](https://forum.kirupa.com/t/uploading-images-bytearrays-or-php/280819/1 "2009-02-01T19:13:12Z")

</div>

Hi,

I’m building a back end for a site using AMFPHP, MYSQL etc, which needs fairly standard uploading of files (images), text editing etc functionality.

I’ve currently got uploading working using PHP called via a URLRequest and a standard move\_uploaded\_file function and also using bytearrays which get written back to the server via an AMFPHP method.

Both work fine. Is there any downside to using the filereference.load() method and writing bytearrays back to jpgs? How are the bytearrays stored by the filereference class memory managed?

I couldn’t manage to figure out how to use move\_uploaded\_file file within an AMFPHP method, otherwise I’d just do that. Ideally I want to keep everything within my various AMFPHP methods.
