/    Sign up×
Community /Pin to ProfileBookmark

Upload Filter problem

Help! How do I get the upload filter to submit the files to an email address? Here is the code:

<!– TWO STEPS TO INSTALL UPLOAD FILTER:

  • 1. Copy the coding into the HEAD of your HTML document

  • 2. Add the last code into the BODY of your HTML document –>
  • <!– STEP ONE: Paste this code into the HEAD of your HTML document –>

    <HEAD>

    <SCRIPT LANGUAGE=”JavaScript”>
    <!– Original: ArjoGod, Shauna Merritt –>
    <!– Modified By: Ronnie T. Moore, Editor –>

    <!– This script and many more are available free online at –>
    <!– The JavaScript Source!! [url]http://javascript.internet.com[/url] –>

    <!– Begin
    extArray = new Array(“.gif”, “.jpg”, “.png”);
    function LimitAttach(form, file) {
    allowSubmit = false;
    if (!file) return;
    while (file.indexOf(““) != -1)
    file = file.slice(file.indexOf(““) + 1);
    ext = file.slice(file.indexOf(“.”)).toLowerCase();
    for (var i = 0; i < extArray.length; i++) {
    if (extArray[i] == ext) { allowSubmit = true; break; }
    }
    if (allowSubmit) form.submit();
    else
    alert(“Please only upload files that end in types: ”
    + (extArray.join(” “)) + “nPlease select a new “
    + “file to upload and submit again.”);
    }
    // End –>
    </script>
    </HEAD>

    <!– STEP TWO: Copy this code into the BODY of your HTML document –>

    <BODY>

    <center>
    Please upload only images that end in:

    <script>
    document.write(extArray.join(” “));
    </script>
    <p>

    <form method=post name=upform action=”/cgi-bin/some-script.cgi” enctype=”multipart/form-data”>
    <input type=file name=uploadfile>
    <p>
    <input type=button name=”Submit” value=”Submit” onclick=”LimitAttach(this.form, this.form.uploadfile.value)”>
    </form>
    </center>

    <p><center>
    <font face=”arial, helvetica” size=”-2″>Free JavaScripts provided<br>
    by <a href=”http://javascriptsource.com”>The JavaScript Source</a></font>
    </center><p>

    <!– Script Size: 1.55 KB –>

    to post a comment
    JavaScript

    5 Comments(s)

    Copy linkTweet thisAlerts:
    @PittimannMar 10.2004 — Hi!

    You won't be able to achieve that without a server side language. Do you know, which one(s) your server supports?

    Cheers - Pit
    Copy linkTweet thisAlerts:
    @dmcgeeauthorMar 10.2004 — No I don't. the host is netrack.
    Copy linkTweet thisAlerts:
    @PittimannMar 10.2004 — Hi!

    Without a server side language you would need to have the user send you an email with a "manually" attached file. To avoid that, you have to find out, what server side language you may use and then deal with the problem in that (or one of these) language(s).

    Otherwise, it won't be possible (except if you know somebody, who can host that single script for you)...

    Cheers - Pit
    Copy linkTweet thisAlerts:
    @dmcgeeauthorMar 10.2004 — Thanks.
    Copy linkTweet thisAlerts:
    @PittimannMar 10.2004 — Hi!

    Your welcome!

    I should have insisted a bit more in the possibility of having such a script hosted externally (i. e.: if your server doesn't support one of the languages required, you could ask a friend whose server -let's say- supports PHP and the script could go to his/her webspace).

    So you'll not be lost, if the script cannot run on your own server...

    Cheers - Pit
    ×

    Success!

    Help @dmcgee spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.19,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...