Adding an image to a Google site from Docs using Apps Script
===

I have a script that allows a user to upload an image to Google Docs, this part works but I need a way to retrieve the image itself so that it can be displayed on a Google Site.  I tried using doc.getUrl() but that only returns the link for downloading the image.  Does anyone know how to achieve this or of another way to handle the image upload which would work better?

This is my code:

        function doGet(e) {
           var app = UiApp.createApplication().setTitle("Upload");
           var formContent = app.createVerticalPanel();
           formContent.add(app.createFileUpload().setName('thefile'));
           formContent.add(app.createSubmitButton('Submit'));
           var form = app.createFormPanel();
           form.add(formContent);
           app.add(form);
           return app;
        }

        function doPost(e) {
           var fileBlob = e.parameter.thefile;
           var doc = DocsList.createFile(fileBlob);
           var url = doc.getUrl();
           Logger.log(url);
        }

Thanks in advance for your help.