you cold use a system call to scp to transfer your file after having had the user input (or browse for) the file name, something like :
system("scp $sourceFileName $storageAccount\@$storageServer:".'~'."/s +torage");
This assumes the name of the file you want to upload is in $sourceFileName and the rest is the destination: the account and server followed by colon and the path to where the file should be store. In that example the path begins with the home of $storageAccount and goes into the storage directory. You can of course modify that to be any path, starting even with /. Check out the scp man page, you'll get a good description.

This offer secure file transfer but you may need to provide a password for your upload to work. To automate that read this

Of course, this use scenario may not fit your needs (you may not want to / be able to do that key exchange) but it is one variant I could suggest based on what info you provided.

Here's additional pointers if the above doesn't match your needs (again, I think your problem is a little under-specified): link1 and link2 and link3 Hope this helps.


In reply to Re: how can i upload a file to my webserver by RaduH
in thread how can i upload a file to my webserver by koleti

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.