Sorry... I can't deal with all the SPAM so until I can find a better solution for the forums, I'm locking them down. For now please use awesome services like stackoverflow.com for community support. Thanks.
This forum is a community forum meant for users of the plugin to collaborate and help solve issues with implementation, etc. Unfortunately, as the creator of the plugin, I do not have much time to attend to every request here as this is only a side project and I must work a full-time job to provide for my family. This is how I keep the Flash version free and the HTML5 version low cost.
unable to implement with script path
  • using firefox to view development on remote server
    Uploadify v1.6.2

    here is how my structure is on the server:
    public_html/manage/admin.php
    public_html/manage/js/uploadify/jquery.uploadify.source.js
    public_html/manage/js/uploadify/cancel.png
    public_html/manage/js/uploadify/check.php
    public_html/manage/js/uploadify/uploader.swf

    and can be viewed from the browser as:
    http://www.website.com/manage/admin.php
    http://www.website.com/manage/js/upload ... .source.js
    http://www.website.com/manage/js/uploadify/cancel.png
    http://www.website.com/manage/js/uploadify/check.php
    http://www.website.com/manage/js/uploadify/uploader.swf


    the file admin.php is where i am trying to load uploadify ( public_html/manage/admin.php ). here is what i have in the of the file:
    <script src=\"js/jquery.js\" type=\"text/javascript\"></script>
    <script src=\"js/uploadify/jquery.uploadify.source.js\" type=\"text/javascript\"></script>


    in the body of the file where i'm wanting to call a single file upload box i have:
    <input type=\"file\" id=\"fileInput1\" name=\"fileInput1\" />
    <br />
    <a href=\"javascript:$('#fileInput1').fileUploadStart();\">Upload Files</a>
    <script type=\"text/javascript\">
    $(document).ready(function() {
    $('#fileInput1').fileUpload({
    'uploader':'js/uploadify/uploader.swf',
    'script':'js/uploadify/upload.php',
    'cancelImg':'js/uploadify/cancel.png',
    'folder':'js/uploadify/_uploads'
    });
    });
    </script>


    i am unable to get anything to work in trying to load the uploadify. i don't know if i'm referencing the files correctly or if there is a better way to do it. any and all help would be greatly appreciated. thanks!
  • I take it you can see the uploadify browse button?? Try adding the onError code found here http://uploadify.com/forum/viewtopic.php?f=5&t=12 It will at least give you a place where to start looking. Also check your server settings http://uploadify.com/forum/viewtopic.php?f=7&t=13
  • nope, i'm not able to see the flash button, that is the first thing that indicates that it's not working. i see a normal input box, along with a normal browse button, but not the uploadify browse button.
  • i saw some people who had mentioned the pagePath variable, but i just don't know if that's something i need to worry about or not. thanks for your help!!!
  • are you using mod_rewrite or a CMS? Basically when your site loads admin.php does the path in your browser say:

    http://www.mywebsite.com

    or

    http://www.website.com/manage/admin.php

    If it looks like the first one then your paths in your js need to start with manage ie uploader:'manage/js/uploadify/uploader.php'
  • TravisN. said:
    are you using mod_rewrite or a CMS? Basically when your site loads admin.php does the path in your browser say:

    http://www.mywebsite.com

    or

    http://www.website.com/manage/admin.php

    If it looks like the first one then your paths in your js need to start with manage ie uploader:'manage/js/uploadify/uploader.php'


    it looks like :
    http://www.website.com/manage/admin.php

    what to do for that one?
  • i'm stuck with this one step, any help would be really appreciated!!
  • You haven't been forgotten, I've just been away this weekend. There are three things you can try.

    1. all your paths appear correct. check all of your javascript. A syntax error elsewhere on your page can cause Uploadify not to load. Especially if your using Internet Explorer.
    2. move the .ready() to your head
    3. try adding "/" to the front of you paths

    the last two should have no effect, but it's still worth a shot.

    The last thing you can do is to compress your manage folder, and I'll have a look at your work as a whole.
  • thanks for getting back to me , i really do appreciate it.


    TravisN. said:
    1. all your paths appear correct. check all of your javascript. A syntax error elsewhere on your page can cause Uploadify not to load. Especially if your using Internet Explorer.

    i'll check for syntax error on the page. i use firefox for development, not IE. i also have firebug. would there be a way to double check and see if there was a syntax error anywhere using firebug and firefox?


    TravisN. said:
    2. move the .ready() to your head

    i'll do that. tried it before and it didn't have any impact, but i'll try it again.

    TravisN. said:
    3. try adding "/" to the front of you paths

    i'll try that as well. is there a place to hardcode a specific path , even if it's the full domain like this:
    http://www.website.com/manage/directory ... lename.php

    ?


    TravisN. said:
    The last thing you can do is to compress your manage folder, and I'll have a look at your work as a whole.

    yeah the manage folder is huge and it is based off of zenphotos package, so tooons of stuff there already plus what i've created and modified.

    let's see what happens when i do the above!
  • I don't use firebug so I don't know, but Syntax highlighting development software helps a lot. I use Coda on the mac, but other software such as Dreamweaver or eclipse also have it.

    Unfortunately you can't use absolute paths with Uploadify right now.

    Even if you sent the manage.php, may be all I need. For two other people it was just html and js syntax errors in their calling files.
  • getting some errors, maybe it'll help to show where some things are going wrong.

    i have it laid out like this on the page:

    in the header
    <script src=\"js/jquery.js\" type=\"text/javascript\"></script>
    <script src=\"js/uploadify/jquery.uploadify.source.js\" type=\"text/javascript\"></script>



    and in the body :
    <input type=\"file\" id=\"fileInput1\" name=\"fileInput1\" />
    <br />
    <a href=\"javascript:$('#fileInput1').fileUploadStart();\">Upload Files</a>
    <script type=\"text/javascript\">
    $(document).ready(function() {
    $('#fileInput1').fileUpload({
    'uploader':'js/uploadify/uploader.swf',
    'script':'js/uploadify/upload.php',
    'cancelImg':'js/uploadify/cancel.png',
    'folder':'/_uploads'
    });
    });
    </script>


    ok, so i opened up the error console in firefox and i got it said the error was :


    Error: $(document).ready is not a function



    so i then i made the header this:
    <script src=\"js/jquery.js\" type=\"text/javascript\"></script>
    <script src=\"js/uploadify/jquery.uploadify.source.js\" type=\"text/javascript\"></script>
    <script type=\"text/javascript\">
    $(document).ready(function() {
    $('#fileInput1').fileUpload({
    'uploader':'js/uploadify/uploader.swf',
    'script':'js/uploadify/upload.php',
    'cancelImg':'js/uploadify/cancel.png',
    'folder':'/_uploads'
    });
    });
    </script>


    and body like this :

    <input type=\"file\" id=\"fileInput1\" name=\"fileInput1\" />
    <br />
    <a href=\"javascript:$('#fileInput1').fileUploadStart();\">Upload Files</a>


    and this was the new error that came up in the error console :
    Error: $(\"#fileInput1\") is null


    what's happening?

    thanks again for your help!
  • ok, had some success on getting the .swf to load in, which loads in the .swf and the button shows. so wahoo on that. but now i can't get the upload to actually work.

    it turns out that the other .js libraries i have loaded are screwing with the "$" . so i just replaced all instances of "$" with "jQuery".

    outlined here : http://devoracles.com/jquery-error-docu ... ction-sure

    still can't get the upload to work though. i click on "browse" button in the flash .swf file, it opens a pop up for me to choose a file. i select a file and that's it. nothing else is shown and so i click on "upload files" and nothing happens.
  • Someone else posted a noconflict answer, which could resolve your problem. just search for noconflict
  • ok cool. that step helped. bam! so now i'm able to get the file name listed , and when i hit upload files, it has a progress percentage there, then fades away. yet no file is to be found on the server!

    haha. one step at a time i guess. thanks for your help again.
  • ok, after tinkering with it some more, i just needed to modify js/uploadify/upload.php to say this:

    [code=php]<?php<br />// Uploadify v1.6.2
    // Copyright (C) 2009 by Ronnie Garcia
    // Co-developed by Travis Nickels
    if (!empty($_FILES)) {
        
    $tempFile $_FILES['Filedata']['tmp_name'];
        
    //$targetPath = $_SERVER['DOCUMENT_ROOT'] . $_GET['folder'] . '/';
        
    $targetPath $_SERVER['DOCUMENT_ROOT'] . '/clients/manage/allUploadsGoHere/'$_GET['folder'] . '/';
        
    $targetFile =  str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];
        
        
    // Uncomment the following line if you want to make the directory if it doesn't exist
         
    mkdir(str_replace('//','/',$targetPath), 0755true);
        
        
    move_uploaded_file($tempFile,$targetFile);
    }
    echo 
    "1";
    ?>[/code]

    so now the uploads are working. wahoo! next thing to do is to modify the code to inject the newly uploaded file into a database column. i'll do a search on here, but if you have a quick link to point me towards, would be appreciated !
  • The user and all related content has been deleted.