View Full Version : Picup App Integration

08-04-2012, 07:26 AM
the site im working on is datethebasin.com using the mobile template which can only be accessed by a mobile phone via a redirect. using the following tutorial: http://www.parorrey.com/blog/php-development/resolve-mobile-safari-greyed-out-file-field-issue-in-iphone-ipod-ipad-by-using-picup-app-to-upload-images/

The site loads correctly now however when testing, when the upload function is clicked and the picture is uploaded the app 404's im guessing that's because the configuration info in the script here is wrong. Im guessing it is the callbackURL.

<script type="text/javascript">
var currentParams = {}

document.observe('dom:loaded', function(){


// We'll check the hash when the page loads in-case it was opened in a new page
// due to memory constraints

// Set some starter params
currentParams = {
'callbackURL' : 'http://www.datethebasin.com/index.php?m=account_register',
'referrername' : escape('App Name'),
'referrerfavicon' : escape('http://www.datethebasin.com/favicon.ico'),
'purpose' : escape('Select your photo for the our App.'),
'debug' : 'false',
'returnThumbnailDataURL': 'true',
'thumbnailSize' : '80'

Picup.convertFileInput($('photo'), currentParams);


Also I'm using 2 upload buttons right now and I dont believe that will work because the second upload button for the iphone isnt connected to the database as it is not using the same id. However the id for the iphone app to work has to be "id="photo""

Any ideas how i could just use one button and get this to function correctly?

<dt><label for="field_photo">{lang:"register","select_picture"} <!-- IF settings.require_registration_photo --><i>*</i><!-- ENDIF --></label></dt>
<dd><input id="field_photo" type="file" name="photo" value="" class="text" /></dd>
<p>If on iPhone use button below</p>
<dt><label for="image">Upload Image:</label></dt>
<dd><input type="file" name="photo" id="photo"/></dd>

Attached is the whole page it is suppost to have an extention of .tpl but had to change it to .txt to upload it.
Whoever can help me get this working right I will be willing to thank you via paypal.