Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7582677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:29:38+00:00 2026-05-30T18:29:38+00:00

All, I’ve included the JS files in my WordPress themes that I needed. Then

  • 0

All,
I’ve included the JS files in my WordPress themes that I needed. Then I created the following page:

<?php
$js_path_uploadify = ABSPATH."wp-content/uploadify.swf";
$js_path_script = ABSPATH."wp-content/uploadify.php";
$cancel_path = ABSPATH."wp-content/cancel.png";
$check_path = ABSPATH."wp-content/check.php";
$uploads_path = ABSPATH."wp-content/uploads";
?>
<script type="text/javascript">
$(document).ready(function() {
  $('#custom_file_upload').uploadify({
    'uploader'  : '<?php echo $js_path_uploadify; ?>',
    'script'    : '<?php echo $js_path_script ; ?>',
    'cancelImg' : '<?php echo $cancel_path; ?>',
    'folder'    : '<?php echo $uploads_path; ?>',
    'auto'      : false,
    'multi'     : true,
    'fileExt'        : '*.jpg;*.gif;*.png',
    'fileDesc'       : 'Image Files (.JPG, .GIF, .PNG)',
    'buttonText': 'Add Files',
    'checkScript': '<?php echo $check_path; ?>',
    'displayData': 'speed',
    'onComplete': function(a, b, c, d, e){ alert(d);},
    'onAllComplete': function(event,data){
            //something here
     },
        'onError': function(event,data){
            //something here
        }
  });

  $("#upload_files").click(function(){
      alert("it is here");
    $('#custom_file_upload').uploadifyUpload();
  });
});
</script>

</head>
<body>
<div id="status-message">Select some files to upload:</div>
<input id="custom_file_upload" type="file" name="Filedata" />
<div id="error-message"></div>
<input type="button" id="upload_files" value="Upload Files">

When I do this it looks good but I get the following error when I check my console.log. The error is:

Not allowed to load local resource: file:///D:/My%20Documentsxampphtdocs%0Bendor_wordpress/wp-content/uploadify.swf

Any idea on what is wrong with this or how to fix it?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:29:39+00:00Added an answer on May 30, 2026 at 6:29 pm

    You don’t want to be using ABSPATH here.

    The error:

    Not allowed to load local resource: file:///D:/My%20Documentsxampphtdocs%0Bendor_wordpress/wp-content/uploadify.swf

    explains that you are trying to load that swf via your local file system. You don’t want to do that. Instead, you want it to point to the location on your webserver.

    More importantly, you should not place the uploadify files directly into wp-content. They should, ideally, be placed in your theme’s folder. I have changed the location of the the uploadify files in the code that follows. You can move them around if you want within the theme folder (make sure to update the variables accordingly!)

    <?php
    $template_url = get_bloginfo('template_url');
    $upload_dir = wp_upload_dir();
    
    $js_path_uploadify = $template_url."uploadify/uploadify.swf";
    $js_path_script = $template_url."uploadify/uploadify.php";
    $cancel_path = $template_url."uploadify/img/cancel.png";
    $check_path = $template_url."uploadify/check.php";
    $uploads_path = $upload_dir['path'];
    ?>
    

    I’ve never used this script before. This is just a general guideline to follow and should help you further debug/solve your problem. Here is more about wp_upload_dir and bloginfo should you need it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I have some script tags that are not working in Wordpress. If I
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
All the code/commands below are part of a PHP script that processes images from
All, If I run a query like the following: $qry = Select wrong_column from
All, If I've go the following database fields/values: user_id field_name field_value 1 EventHour1 1
All I want to do is return the index of the i that is
All my files can be found on GitHub: https://github.com/Integralist/Passage (just in case you need
All the guys probably will recommend that I read the follow previously question in
All programs that I develop utilize the default Windows Design template: Besides from changing
All, Say I have the following bit of code: select: function(start, end, allDay) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.