Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
Photos-4-all.com  
#1 Posted : Thursday, May 3, 2012 9:19:04 AM(UTC)
Photos-4-all.com

Rank: Member

Groups: Member
Joined: 5/3/2012(UTC)
Posts: 14

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
Hi there,

I currentley have a Joomla website, and I would like to use Aurigma Up so people can upload there photos from Iphone/Android phones to a folder on my server so we can print them out for them.

But I don't know any php code and I'm completely lost on how to write code and where to put the php file for saving the uploaded photos on my servers hard drive.

I have downloaded code examples from you, but still lost on what to do with it or how to edit it for my website. I would like a easy step by step for dummies guide/video tutorials for Aurigma Up.

Also on the Iphone/Android app can the app ask for the users name before photos are uploaded, so it can save the photos in a folder called there name, so photos don't get mixed up with other peoples photos.

Regards,

Mark Marshall
Dmitry.Obukhov  
#2 Posted : Friday, May 4, 2012 1:05:40 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Mark,

Unfortunately we do not have similar video guides. If you have problems with embedding Aurigma Up on your site, you should hire a programmer which will do it for you.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Photos-4-all.com  
#3 Posted : Friday, May 4, 2012 1:44:01 AM(UTC)
Photos-4-all.com

Rank: Member

Groups: Member
Joined: 5/3/2012(UTC)
Posts: 14

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
Hi Dmitry Obukhov,

Thanks for your reply.

I have uploaded the example php code and files to my server (from the SDK) and when I go to the page on my Android phone it says: "Aurigma Up works on Apple iPad and iPhone only." Please can I have a SDK code example that will work on both Android & Iphone, like the demo.aurigma.com you have running, what works on my Android. I want to try and do it my self.

Regards,

Mark Marshall
Dmitry.Obukhov  
#4 Posted : Friday, May 4, 2012 9:42:07 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hi Mark,

I've created very basic PHP sample for Aurigma Up (iOS/Android) and attached it for your reference.

Your sample includes:
  1. index.php file with Aurigma Up link. You can learn how to build it on our [url=]site[/url].
  2. upload.php file which receives the request from the app and saves the uploaded files in Temp folder.
  3. redirect.php file which opens after complete upload.
  4. Temp folder to store uploaded files.
Please pay your attention on the following:
  • Your Aurigma Up link contains uploadUrl and redirectUrl. You should specify your own URLs with your domain name.
  • Note that redirectUrl is mandatory parameter in current Aurigma Up version. If you don't specify it Upload button in your app will be desabled.
  • I inserted new trial license key.
If you have any questions please feel free to contact me.
File Attachment(s):
AurigmaUp(iOS-Android).zip (2kb) downloaded 27 time(s).
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
thanks 1 user thanked Dmitry.Obukhov for this useful post.
Photos-4-all.com on 5/8/2012(UTC)
Photos-4-all.com  
#5 Posted : Saturday, May 5, 2012 2:14:30 PM(UTC)
Photos-4-all.com

Rank: Member

Groups: Member
Joined: 5/3/2012(UTC)
Posts: 14

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
Hi Dmitry,

I uploaded the example and tried in on my website, and it worked. Thank you soo much.

I have been playing around with the code and can't get something to work.

I have created a form on the index.php file to ask the user for there name, then which loads data.php to load up Aurigma Up app and then save the image in a folder within Temp with there name as the folder. I have tried $_POST & $_GET and can't get it to work. I attach my files to this post.

Please can you give me some idea's, tip on how to do this please, as I would like to have a go first to try and get it to work.

Regards,

Mark Marshall
File Attachment(s):
Upload.zip (2kb) downloaded 11 time(s).
Photos-4-all.com  
#6 Posted : Sunday, May 6, 2012 8:27:13 AM(UTC)
Photos-4-all.com

Rank: Member

Groups: Member
Joined: 5/3/2012(UTC)
Posts: 14

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
Hi again Dmitry,

I have been able to use the data in the form I created in index.php and display it in redirect.php by using $_SESSION.

So in upload.php I used $_SESSION to try and make a folder with there name, which they typed in index.php, but I can't get it to work.

I attach folder of what I have done so far.

Regards,

Mark Marshall
File Attachment(s):
New Upload.zip (3kb) downloaded 16 time(s).
Dmitry.Obukhov  
#7 Posted : Monday, May 7, 2012 10:03:34 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Mark,

Please see this post. You will find the sample application which is more complicated that one I gave you but it demonstrates how to use cookies, send them to server and catch them.

To make it working on Android please do not forget to add this part of code to index.php file:
Code:

<!--Installation link-->
<a href="#" style="display:none" id="downloadAppLink">Install Aurigma Up to upload images</a>
<script type="text/javascript">
(function() {
    var ua = navigator.userAgent;
    var link = document.getElementById("downloadAppLink");
    if (ua.indexOf("Android") > -1) {
        link.setAttribute("href", "https://play.google.com/store/apps/details?id=com.aurigma.aurigmauploader");
        link.style.display = "";
    } else if (ua.indexOf("iPhone") > -1 || ua.indexOf("iPad") > -1) {
        link.setAttribute("href", "http://itunes.apple.com/us/app/aurigma-up/id432611633");
        link.style.display = "";
    }
})();
</script>
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
thanks 1 user thanked Dmitry.Obukhov for this useful post.
Photos-4-all.com on 5/8/2012(UTC)
Photos-4-all.com  
#8 Posted : Tuesday, May 8, 2012 1:46:08 PM(UTC)
Photos-4-all.com

Rank: Member

Groups: Member
Joined: 5/3/2012(UTC)
Posts: 14

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
Hi Dmitry,

Thanks for that. I got my code to work after reading the post and looking at the zip file in that post.

I now have a new problem and I can't fix it. I have updated my index.php with a lot of new fields, name, size, delivery time & qty.

In data.php I create folders within folders for there order from the form data, example: Temp/Mark/Express Service/6x4/x1.

Then in upload.php, is where the problem is. I can save the uploaded image in Temp/YourName (upload.php line 19 works fine) but I cant get the image to save in Temp/YourName/Express Service/6x4/x1 (upload.php line 17 or 18 doesn't work), I get an error.

Can I have some advice please. I attach updated files, including the error file I get.

Regards,

Mark Marshall
File Attachment(s):
Mobile Upload.zip (3kb) downloaded 13 time(s).
Dmitry.Obukhov  
#9 Posted : Wednesday, May 9, 2012 11:54:22 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Mark,

Your sample is excellent :) I just made several changes and added my comments to code. Files were not uploaded to necessary path because wrong value of ‘folderpath’ was sent. You set so:
Code:

$folder = $name . "/" . $time . "/";

Thus all the files were uploaded to Temp/name/time/ folder only. To make it working as needed you should set the $folder variable this way:
Code:

$folder = $name . "/" . $time . "/". $size . "/" . $qty . "/";

Then this variable is sent along with files as cookie. The value of cookies is parsed on server-side so that uploaded files will be saved on correct path. Please download the sample and try it out. My tests showed that it works okay. If you have any problems, I will be glad to assist you.

Edited by user Wednesday, May 9, 2012 11:55:23 PM(UTC)  | Reason: Not specified

File Attachment(s):
AurigmaUp_sample+comments.zip (3kb) downloaded 18 time(s).
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Photos-4-all.com  
#10 Posted : Thursday, May 10, 2012 2:23:43 AM(UTC)
Photos-4-all.com

Rank: Member

Groups: Member
Joined: 5/3/2012(UTC)
Posts: 14

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
Hi Dmitry,

Thanks for your code. I uploaded your code to my server and tried it on my phone. I just changed the upload url & redirect url in data.php for my server.

I still doesn't work properly. It makes the folders fine from the data in the forms but cant put the images that I upload froom my phone in the folder: Temp/name/time/size/qty I just get and error log file.

Error code below:

[10-May-2012 10:01:00 UTC] PHP Warning: move_uploaded_file(/boeing_01.jpg) [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: failed to open stream: Permission denied in /home/photosal/public_html/mobile/upload.php on line 16

[10-May-2012 10:01:00 UTC] PHP Warning: move_uploaded_file() [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: Unable to move '/tmp/phpBkK8SP' to '/boeing_01.jpg' in /home/photosal/public_html/mobile/upload.php on line 16

I attach the files with error log.

I can give you access to that folder only on my server so you can test it an see what happens, if you like?

Thanks again, very much.

Regards,

Mark Marshall
File Attachment(s):
AurigmaUp.zip (4kb) downloaded 10 time(s).
Dmitry.Obukhov  
#11 Posted : Thursday, May 10, 2012 3:03:21 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
It seems that you do not have necessary permissions. Please set write permissions for your project and let me know about your results. Unfortunately I did not face this behavior with your project on our testing server.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Photos-4-all.com  
#12 Posted : Thursday, May 10, 2012 3:46:58 AM(UTC)
Photos-4-all.com

Rank: Member

Groups: Member
Joined: 5/3/2012(UTC)
Posts: 14

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
Hi Dmitry,

Thanks for your quick reply.

I have change the folder permissions to 755, 775, 777 and none of these work.

If I change the code below in data.php:
Code:
$folder = $name . "/" . $time . "/". $size . "/" . $qty . "/";

Code above gives me an error log file. Can't put image it into Temp/name/time/size/qty.

but if I change it to:

Code:
$folder = $name . "/";

Code above works but it only puts the image into Temp/name, name being the new folder it made.

This is very strange.

Regards,

Mark Marshall
Nikon  
#13 Posted : Thursday, May 10, 2012 5:14:47 AM(UTC)
Nikon

Rank: Advanced Member

Groups: Member
Joined: 5/1/2010(UTC)
Posts: 60

Thanks: 1 times
Hey Guys! I have tried your little coding example. Everything works perfectly except that there is no image in the folder that I have uploaded via Aurigma Up!

Have a nice day!
Dmitry.Obukhov  
#14 Posted : Thursday, May 10, 2012 9:34:20 PM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hi Mark,

I tested this sample on two servers and everything works great – uploaded images are saved on the created url $name/ $time /$size/$qty/. Please contact your staff who is responsible for server and discuss this problem with them. Probably your server has some special PHP settings which do not allow to save images in subfolder or it has strict security settings.

Hi Tom,

Could you please check your error log on your server? Also, please check that you specified correct settings of Aurigma Up in the sample you downloaded.

Edited by user Thursday, May 10, 2012 9:34:57 PM(UTC)  | Reason: Not specified

Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Photos-4-all.com  
#15 Posted : Friday, May 11, 2012 2:33:25 AM(UTC)
Photos-4-all.com

Rank: Member

Groups: Member
Joined: 5/3/2012(UTC)
Posts: 14

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
Hi Dmitry,

I have spoke to my web hosting company, they added something in upload.php and said there should be no reason for it not to work, also they said:

"upload.php uses a variable called $cookie but upload.php uses the actual $_COOKIE array, however I can't see anywhere that a cookie is set.

As long as move_uploaded_file() is given the correct arguments it will definitely work."

Regards,

Mark Marshall

Edited by user Friday, May 11, 2012 2:47:38 AM(UTC)  | Reason: Not specified

Dmitry.Obukhov  
#16 Posted : Friday, May 11, 2012 2:57:33 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Mark,

Cookies is set on data.php page:
Code:
$cookie =  'cookies=' . session_name() . '=' . session_id() . ';' . 'folderpath=' . $folder;

There are two cookies with names: seession_name and folderpath. We are interested in folderpath cookie.

Then cookies are added to Aurigma Up link:
Code:
header("Location: " . $url . $cookie);

In this case all the cookies which were set will be sent along with files to upload.php page. On upload.php we can get values of sent cookies via $_COOKIE varable:
Code:
$fpath = $_COOKIE['folderpath'];

$fpath includes path we set on data.php page, and it is used to save uploaded files to this path.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
lxp  
#17 Posted : Monday, May 14, 2012 6:15:59 AM(UTC)
lxp

Rank: Member

Groups: Member
Joined: 5/10/2012(UTC)
Posts: 10

Hi Mark,

Were you able to get Aurigma to work with Joomla? If so, would you be willing to share how this was accomplished? I too, have a joomla 2.5 site (real estate) that I would like to incorporate with Joomla. I placed the code in the Jumi component, which allows php, js etc to be embedded in the page but when trying to execute I get the following error:


Java Plug-in 1.6.0_31
Using JRE version 1.6.0_31-b05 Java HotSpot(TM) Client VM
User home directory = C:\Users\lxp

c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>



load: class com.aurigma.imageuploader.ImageUploader not found.
java.lang.ClassNotFoundException: com.aurigma.imageuploader.ImageUploader
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: com.aurigma.imageuploader.ImageUploader


and then the browser crashes. I'd love to be able to make this work with Joomla if at all possible. Thanks!

LP
Photos-4-all.com  
#18 Posted : Monday, May 14, 2012 9:21:58 AM(UTC)
Photos-4-all.com

Rank: Member

Groups: Member
Joined: 5/3/2012(UTC)
Posts: 14

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
Hi Dmitry & lxp,

lxp your reply is at the bottom of this post.

Hi Dmitry,

Disregard my last post, I understood how it worked, just my webhosting company wasn't sure. We got it to work, couple of things you may need to know if someone else has the problem, i'll explain below.

I have a linux web hosting with cpanel, the problem was with the folder destination and using realpath();. The code below is what we had before:

Code:
 <?php 

session_start();

//Get cookies with path (values of fields which were set on index.php)
$fpath = $_COOKIE['folderpath'];

$foldername = './Temp/' . $fpath;

$path = realpath($foldername) . DIRECTORY_SEPARATOR;

$fileCount = $_POST["PackageFileCount"];
 
for ($i = 0; $i < $fileCount; $i++) {
    if (isset($_FILES['File0_' . $i])) {
        move_uploaded_file($_FILES['File0_' . $i]['tmp_name'], $path . $_POST['SourceName_' . $i]);
    }
}


And then it changed it to for it to work:

Code:
 <?php 

session_start();

//Get cookies with path (values of fields which were set on index.php)
$fpath = $_COOKIE['folderpath'];

//Path for the folder
$foldername = '/home/photosal/public_html/mobile/temp/' . $fpath;

$fileCount = $_POST["PackageFileCount"];
 
for ($i = 0; $i < $fileCount; $i++) {
    if (isset($_FILES['File0_' . $i])) {
        move_uploaded_file($_FILES['File0_' . $i]['tmp_name'], $foldername . $_POST['SourceName_' . $i]);
    }
}


We had to change the $foldername to my full path, e.g. '/home/photosal/public_html/mobile/temp/' and remove $path vaiable using the realpath(). So anyone I think with a cpanel the path should be: /home/username/public_html/somefolder/file.

Now this would work, but Linux is case sensitive on folder names, so all folders need to be lowercase. So in data.php it would create a folder like: Temp/Mark/Express Service/6x4/x1, but move_uploaded_file would try and put it in: temp/mark/express service/6x4/x1 which didn’t exist so you get an error log. So I changed all my form values to lowercase, change folder Temp to temp and used strtolower(); for the name variable to change it to lowercase. Hope this helps in the future if someone has the same problem. I'll uploaded my finished project when its done for you to have a look.

Also how can I transfer (e.g. post,get,session,cookie) data in upload.php like $fileCount variable, so I can use it in redirect.php?

Hi lxp,

I haven’t finished my project yet but I have tried it on my joomla 2.5 website with jumi and it all works fine, can you please upload your files on your next post so I can have a look for you and see why it’s not working and help you to get it to work with joomla 2.5 and jumi.

Kind Regards,

Mark Marshall

Edited by user Monday, May 14, 2012 9:23:28 AM(UTC)  | Reason: Not specified

Dmitry.Obukhov  
#19 Posted : Tuesday, May 15, 2012 1:34:53 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Larry,

class com.aurigma.imageuploader.ImageUploader not found means that ImageUploader7.jar file could not be found. Please check that you specify correct url to folder where JAR file is located.

Hello Mark,
Quote:
I'll uploaded my finished project when its done for you to have a look.

Okay.
Quote:
Also how can I transfer (e.g. post,get,session,cookie) data in upload.php like $fileCount variable, so I can use it in redirect.php?

You need to create XML file. Then implement script in upload.php which will saves different data to this XML file. After that in redirect.php anoter script will parse the XML file to get data.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Photos-4-all.com  
#20 Posted : Tuesday, May 15, 2012 12:29:35 PM(UTC)
Photos-4-all.com

Rank: Member

Groups: Member
Joined: 5/3/2012(UTC)
Posts: 14

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
Hi Dmitry,

I have created a xml file, but in redirect.php and I can't open the file, I know how to open an xml file and get data from it but, in redirect.php it doesn't know the folder or file name the xml is in.

upload.php creates the xml file by xml.php and saves the xml file in: temp/ orderid / orderid .xml orderid being the variable. So when I use simple_load_file(); in redirect.php I don't know how to get the orderid so I can open the folder it is in and the xml file. There is a comment in redirect.php on what I want to do, basicly echo all the details of there order on the page. I attach files to this post.

I have added comments everywere in all the php files to explain whats going on. Also I have left two orders in ./temp/ for you to see what is created.

Regards,

Mark Marshall

Edited by user Tuesday, May 15, 2012 12:31:23 PM(UTC)  | Reason: Not specified

File Attachment(s):
AurigmaUp - Forum.zip (492kb) downloaded 4 time(s).
Users browsing this topic
Similar Topics
Help with Java issues and our older version of your uploader (Discussions – ActiveX/Java Uploader)
by hip 12/26/2013 12:44:43 PM(UTC)
Installation error, please help. (Upload CMS Plug-ins (Photo Order 2.x for VM, Drupa)
by auth_merch 7/26/2012 10:21:07 AM(UTC)
URL specified in the Action property has an incorrect syntax. Help! (Discussions – HTML5/Flash Uploader)
by Larry Cheung 2/15/2012 2:47:39 AM(UTC)
Need help from a German-speaking... (Discussions – ActiveX/Java Uploader)
by KKopf 4/18/2011 9:29:07 AM(UTC)
Trail version help (Discussions – ActiveX/Java Uploader)
by WFUK 2/10/2011 5:28:47 AM(UTC)
Deployment Issue on 64bit running IIS7--- HELP!!-- (Discussions – Graphics Mill)
by synbios1978 7/16/2010 4:27:26 AM(UTC)
Help on handling MultipleDescription functionality (Discussions – ActiveX/Java Uploader)
by Deepak 7/12/2010 7:06:41 PM(UTC)
Help with setDropFilesHereImageFormat ? (Discussions – ActiveX/Java Uploader)
by Brainwrek 4/9/2010 1:23:00 PM(UTC)
HELP! some server-side error occurred (Discussions – ActiveX/Java Uploader)
by BLUE 1/29/2010 12:11:21 PM(UTC)
Help!! Trouble about how to Activation the ImageUploader. (Discussions – ActiveX/Java Uploader)
by gostop 12/28/2009 11:27:41 AM(UTC)
HELP!! About the System Requirements of Image Uploader ASP.NET Control (Discussions – ActiveX/Java Uploader)
by gostop 12/27/2009 11:41:12 AM(UTC)
Needing to Insert data into mysql database help? (Discussions – ActiveX/Java Uploader)
by Justted 11/13/2009 11:56:24 PM(UTC)
Need Help Regarding Send Button (Discussions – ActiveX/Java Uploader)
by Muzahir 10/12/2009 6:22:49 PM(UTC)
Need help about License Keys (Discussions – ActiveX/Java Uploader)
by Muzahir 10/2/2009 3:23:39 PM(UTC)
need help - can't upload (Discussions – ActiveX/Java Uploader)
by staking 9/25/2009 2:47:33 PM(UTC)
2 Pages12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.