Giving users the ability to upload a single file to my site?

Hello...I'd like to give visitors to my site the ability to
upload files (photographs to be exact) and have them stored on my
server. I use Yahoo web hosting and I'd like to be able to limit
the size of the photo...any tutorials out there?
Thanks a bunch!
www.clairedunaway.com

MrNaSTay wrote:
> Looks like Yahoo supports some PHP functions...there is
a long of list of what they support and don't support...too long to
post here. What should I look for?
>
> Thanks for you time by the way...JC
here's a script that might work; copy and paste in a
Dreamweaver document saved with .php extension
to see the code coloring. My comments are in yellow:
<?php
$path = 'uploaded_images/'; // this is the path where you
want the uploaded images to go
if (isset($_POST['Upload'])){
$error = '';
if(empty($_FILES['imagefile']['name'])){
$error .= '- You must choose an image file on your
computer<br>';
if($_FILES['imagefile']['size'] == 0 ||
$_FILES['imagefile']['size'] > 209715){//this is the
maximum size of the uploaded image, in bytes. (that's
equivalent to 2 MB, which is most probably way
more than what Yahoo will allow...
$error .= '- Image size MUST be under 2MB!!<br>';
if($error == ''){
$imagefile_name = $_FILES['imagefile']['name'];
//Upload------------------------------------
if ($_FILES['imagefile']['type'] == "image/jpeg" ||
$_FILES['imagefile']['type'] =="image/pjpeg"){
if(copy ($_FILES['imagefile']['tmp_name'],
$path.$imagefile_name)){
echo 'The image has been uploaded';
}else{
echo '<span style="color:#f00">The image could not be
uploaded. Please click <a
href="'.$PHP_SELF.'">HERE</a> to try
again...</span>';
exit;
}else{
echo "<br><br>";
echo 'wrong file type ('.$imagefile_name.'). Image MUST be a
jpeg (.jpg or .jpeg extension)<br>
Please click <a href="'.$PHP_SELF.'">HERE</a>
and try again';
exit;
//-----upload end
}else{
echo '<p>'.$error.'</p>';
?>
<form action="<?php echo $PHP_SELF; ?>"
method="post" enctype="multipart/form-data"><input
name="imagefile" type="file"><input name="Upload"
type="submit" value="Upload"></form>
seb ( [email protected])
http://webtrans1.com | high-end web
design
Downloads: Slide Show, Directory Browser, Mailing List

Similar Messages

  • Does allowing adobe flash player plug in on safari give access to websites the ability to upload and transfer documents and files(on the computer) without permission?

    Does allowing adobe flash player plug in on safari give access to websites the ability to upload and transfer documents and files(on the computer) without permission? Perhaps to their online server or somewhere where they designated them to transfer to?

    It depends a bit on which version of Captivate you used to develop your modules and also which version of Flash Player you targeted when publishing your modules from Captivate. Say for example you use Captivate 5 and publish to Flash Player 10. Then your end user would need to have Flash Player 10 on their computer. It shouldn't matter if their version is 10.0.0 or 10.1.0 or 10.1.3 - just as long as it's a 10. If they only have Flash Player 9 then they will need to upgrade.
    The "Access to Adobe.com is restricted" is most likely because the HTML that launches the Captivate SWF sees that you have targeted FP10 and the user only have FP9. Then it tries to direct a call to Adobe in order to present an "Upgrade to latest version of Flash" dialog for the user. This traffic is most likely denied by your IT department.
    The first step is to find out which version of Flash Player is the most prevalent in your organization. If it is Flash Player 9 then simply select that when publishing from Captivate 5. If Flash Player 8 is the most used in your organization and you have CP5 or CP5.5 then you are in big trouble since FP8 is not supported from CP5 and CP5.5.
    /Michael
    www.cpguru.com - Adobe Captivate Widgets, Tutorials, Tips & Tricks and much more..

  • How can I grant users the ability to pause/resume printing without a "print operators group" password.

    Greetings,
    We are running 10.8.5 on 30 machines in an active directory environment (graphics lab). The clients are experiencing a persistant error when pausing or resuming print jobs. Each time something is paused, it requires an administrator password to resume the job. Administrators are not always present so designers are locked out of all of the printers until we come in (or remote in) to authenticate.
    I spoke with Apple today and they said they would not support active directory accounts and that the account must be edited by the department that created the account because the restrictions come from the Active Directory account preferences.
    On the other hand, I ALSO read that I can edit this in the CUPS interface or modify it with the terminal command below, locally.
    dseditgroup -o edit -u admin_name -p -a user_name -t user _lpadmin
    "dseditgroup" adds the user_name to a group (in this case, _lpadmin).
    And admin_name is the name of your administrator's account.
    a) Must this be modified on the Active directory account or CAN I modify this on the local machine via CUPS or terminal?
    b) If so, how would I grant users the ability to resume printing without an admin password?
    c) If not, exactly what must be modified in the active Directory account to allow pause/resume without an admin password.
    I have seen a terminal command that adds users to the print operatiors group (Ipadmin) and I have seen some info on editing the CUPS interface, If i must edit the CUPS interface to allow this, can anyone point to detailed instructions on how to make this change.
    I also saw info on editing the CUPS interface but the suggestion lacked details as to how and how to return to default if it does not work.
    I also saw a post with these suggestions below but without detail as to how one would carry this out.
    /etc/cups/cupsd.conf
    # All administration operations require an administrator to authenticate...
    <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    *#Require user @SYSTEM*
    *Require valid-user*
    Order deny,allow
    </Limit>
    # All printer operations require a printer operator to authenticate...
    <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    *#Require user @AUTHKEY(system.print.operator) @admin @lpadmin*
    *Require valid-user*
    Order deny,allow
    </Limit>
    /etc/authorization
    +The system.print.operator key is new to Snow Leopard and seems to control resuming and pausing a printer queue among other things.+
    <key>system.print.admin</key>
    <dict>
    <key>allow-root</key>
    <true/>
    <key>class</key>
    <string>user</string>
    <key>group</key>
    <string>staff</string>
    <key>shared</key>
    <true/>
    </dict>
    <key>system.print.operator</key>
    <dict>
    <key>allow-root</key>
    <true/>
    <key>class</key>
    <string>user</string>
    <key>group</key>
    <string>staff</string>
    <key>shared</key>
    <true/>
    </dict>
    I have read all posts on this subject and I still am not clear on how to proceed, please assist.
    Thanks in advance,
    V

    Hello again.  For AD environments you can run the following command on each workstation:
    sudo dseditgroup -o edit -n /Local/Default -u localadmin -p -a "Domain Users" -t group _lpadmin
    This command assumes you are typing this interactively on the machine.  Obviously change localadmin to the Mac's local admin's name.  When running you will be prompted for password twice.  Once to elevate permissions (sudo) and once to validate you are localadmin.
    If you are using Apple Remote Desktop (or JAMF or other management suite), you can push this command out while embedding the localadmin's password. 
    sudo dseditgroup -o edit -n /Local/Default -u localadmin -P yourpass -a "Domain Users" -t group _lpadmin
    Please note, if your password uses special characters (/-\) this may fail over ARD.
    In Mavericks, AD groups are cached once they are referenced.  If you are dealing with a lot mobile users (laptops) you might want to replace Domain Users with everyone
    R-
    Apple Consultants Network
    Apple Professional Services
    Author "Mavericks Server – Foundation Services" :: Exclusively available in Apple's iBooks Store

  • I am trying to upload my PDF file from my IBooks but its only giving me the option to upload from my pictures/gallery. How do I get it to where I can upload PDF files from my iBook or how do I transfer my PDF files to my pics?

    I am trying to upload my PDF file from my iBooks but its only giving me the option to upload from my pictures/gallery. How do I get it so I can upload from my iBooks or move my PDF files to my gallery so I can upload it?

    I'm having the same issue. I saved a PDF from an email into iBooks. I'm on apple applying for a job but the only option the upload button has is from the Photos file. How ironic right? Luckily I'm in Logistics and not an IT specialist applying for this job! Lol. Does anyone know the fix?

  • Can I create a form that allows users the ability to add fields?

    I would like to create an asset order form I can host on my company's intranet. I would like to give the users the ability to add additional fields per item they request rather than provide them with a limited amount of fields. For example, the template available from Formscentral has 5 dropdown selection boxes with predetermined supplies to choose from. My office receives requests for multiple, varying assets that I would not be able to list in generic dropdown selection boxes. I want to give users the freedom to enter item titles and provide URLs to online stores they would like me to purchase them from. I want my form to begin with two fields for this information and provide users with an add button that creates two additional fields for each additional item requested.

    Hi,
    In Acrobat Form, you create a hidden Text Field which will only get visible on a Button click for inserting additional text.
    Regards,
    Anoop

  • Apple, please may you put the ability to upload photos from your photo album directly to Facebook in the iOS5.0.2 update?

    Hi apple, I was wondering if you could in the iOS5.0.2 update or the update after that, give the ability to upload photos from your photo album directly to Facebook without having to plug your iPod, iPad or iPhone into your computer.

    Apple does not monitor these forums for suggetions.  To make a suggestion to Apple go here:
    Apple - iPod touch - Feedback

  • When I upload a single file into a production in FCS I can access all the fields in the metadata set, when I upload a batch of files, I can only access a partial number of fields in the metadata set.  Does anyone know why this happens?

    When I upload a single file into a production in FCS, I can access all the fields in a metadata set.  When I upload a batch of files into the same production in FCS, I can all access part of the fields in the metadata set.  Does anyone know why this happens?

    dredcomm,
    Great answer, and it led me to where to solve the problem.  In the field definition screen there is a category drop down list.  If you choose something other than none from the category drop down list then that field won't appear in the list of fields when you attempt to batch import a group of files.
    Thanks,
    Dave

  • ITunes doesn't provide the ability to upload media from the iPod/Iphone. Why is this and why can't it be a drag and drop option as windows

    iTunes doesn't provide the ability to upload media from the iPod/Iphone. Why is this and why can't it be a drag and drop option as windows

    Because Apple have designed it that way.
    It's actually against the (Apple) rules of this forum to speculate about Apple's decisions, so if perhaps you should ask your question on a more appropriate (non-Apple) forum. If you continue the discussion here, you could simply find that your post gets removed by the moderators.

  • How to restrict the ability to save a PDF file in Acrobat.

    Hello ! This is my first topic, evaluating to acquire Acrobat Professional 8, and I am asked if possible to restrict the ability to save a pdf file, when users are reading the file with Acrobat Reader. We are into creating a in-house document accessible to all users internally, using Acrobat Reader. I was able to restrict the printing, but I am unable to restict the saving of the file.
    Any one knows if this possible ? or not?
    Users are using Windows XP/2k
    Thanks

    Once they open it on their machine, they have a copy on that machine. They can simply move that copy to where ever they desire, making copies as they go. You can restrict copying content (though not full proof), printing, and changing the document, but not the physical file itself. Be careful with security and the assumption it fixes all your issues. PDF security is not all that secure. If you need higher levels of security, they you have to use the DRM (I think that is it) at a pretty cost.

  • How can I convert the volume directory into a single file installer?

    How can I convert the volume directory into a single file installer? I would like to hide all the miscillaneous files that I don't care for and be able to have the installer double click a single file and have it automatically install.

    On the second prompt screen when prompted 'What kind of self-extracting Zip file file do you want to make?'
    Are you choosing the second option (self-extracting Zip file for software installation)?
    I have a word file that I created to help me remember - is there anyway to email it to you?

  • It appears that Apple has taken away the ability to highlight, in color, file names, replacing them with just a hard-to-see colored dot. Can I get back the ability to highlight the whole file name in color?!

    It appears that Maverick has banishd the ability to highlight, in color, file folder names, replacing the color highlight band with a hard-to-see color dot. Is there a way to get the color-band highlight ability to operate?

    Welcome to Apple Support Communities
    Apple has replaced that feature in OS X Mavericks by color tags, so you cannot get it back. The only thing you can do is to send feedback to Apple about it, so they will think about including it in future OS X versions > http://www.apple.com/feedback

  • Where is the procedure for uploading my music files to Cloud?

    Where is the procedure for uploading my music files to Cloud?  I have a portable hard drive that has all my burned songs on it, and I'm trying upload and match those songs for the first time.....

    There is no "procedure." When you sign up for iTunes Match, iTunes does all the work for you. But you must have the external HDD connected for it to work.
    Also, keep in mind that iTunes Match is not a streaming service. To play your music on your computer you'll still need to have the external HDD connected, unless you decide to delete all the music from your iTunes library.

  • Providing users the ability to Merge using a DAT file under Windows 7

    Hello,
    Our organization uses older software that uses Word Templates with Merge Fields, pulling data out of a SQL database.  The software itself is old and out of date, but still works under Windows 7.  The problem I am having is that the software will
    place its own macros inside of Normal.dot to properly merge fields using the Word Templates.
    Each Merge document accesses the application folder and goes into a sub-folder to access a file called WORDDATA.DAT that is the data source for the merge.  Each workstation has their own WORDDATA.DAT file stored locally in C:\APPLICATION\temp\
    In XP (we never used Vista), the proper way to get these merges to work was to do the following:
    1. Provide Power Users (see below) with Modify rights to the main APPLICATION folder and propagate those rights down to all files underneath of it (including WORDDATA.DAT).  We also had to remove inheritable permissions from the root drive (C).
    2. Add Domain Users to Power Users group (for some reason the merges on XP would not work without this) so that anyone logging onto the machine could merge.
    3. These templates required the Low security setting for macros in Word for the merge to work properly.
    The problem I am facing now is that I cannot get the merges to work properly under Windows 7 Pro without giving the user Administrator rights on the local machine.  This is obviously not a good idea.  No matter what I try, nothing seems to work. 
    I've disabled UAC on these machines.  Given Full Control rights to the application folder and all sub-folders and have even gone so far as to make the user the Owner of the application folder.  But no matter what I do, the merge will not work unless
    the user is added to the local Administrators group.  I've also noticed strange behavior with WORDDATA.DAT, where it will not relinquish the Read-Only attribute.  After running 'attrib' and stripping it of Read-Only and System attributes, the file
    reverts to showing Read-Only in the properties.  I don't know if this matters or not, but it appears as if Windows will not let anyone modify that file completely.
    Does anyone have a suggestion for a workaround?  Keep in mind, 1. Disabled UAC, 2. Running the application under Compatibility Mode for XP.
    I realize we are using outdated software and this can cause some issues of course, but the basic principle of merging documents works.  It has nothing to do with the application itself IMO but seems to be more of a security issue.

    I guess I'm completely out of luck on this issue huh?  The basics of the problem are simply that unless the user is added to Administrator local group on the Win7 machine, when the merge runs and has to use WORDDATA.DAT, it cannot and the merge fails. 
    Add the user as an admin and it works but this leaves our systems vulnerable, particularly with users who are happy to just double-click on any old attachment without checking it first.

  • QuickTime Player 10.1 no more includes the ability to save a movie file in the same format as the original movie after editing it? No, it doesn't!

    Since upgraded to Lion, I have to wait for QuickTime Player 10.1 to "CONVERT" every file that I edited in it.
    Yes, it might save some disk space for me.(Which is not always the case though.) But it also takes almost 10 times or more as it did when back on Snow Leopard with QuickTime Player 10.0 there I could save any file in the same format as the original movie WITH NO NEED TO CONVERT IT.
    Now I have to wait like 10 minutes to delete just a few frames.(The time it takes depends upon the original size of that movie. The larger the longer.) And guess what? If you have two clips originally split up from a movie and sperately getting saved(converted actually) with a loooooooot of time, and you naively added one of them to the other's end and then saved the finished one. It converts AGAIN! Doing so back on Snow Leopard with QuickTime Player 10.0 only takes you even a few seconds only!
    Seriously, are we eating Apple or dirt this time?

    My existing movies are all the following types straight from FinalCut
    Apple Intermediate Codec, 1920 × 1080, Millions
    16-bit Integer (Little Endian), Stereo, 48.000 kHz
    This particular movie is 6.66 Gb
    The new Quicktime player in OS Mavericks converts these to the following format:
    Apple ProRes 422, 1920 x 1080
    Linear PCM, 16 bit little-endian signed integer, 2 channels, 48000 Hz
    And a movie size of 6.48 Gb
    It seems obvious from other forum posts this is a planned move so that everything is the "new mobile device" ready state/format. To use Marc Speth's post as material....
    https://discussions.apple.com/message/23749558#23749558
    this is probably about dumbing down desk top OS to that pf iPhones and iPads. This is not what I paid good money to own a Mac Book Pro for....
    Today I rolled all the back to Snow Leopard. Really good move...... All those new features hey? I lost the ability to work in spaces and of course the whole Quicktime debacle.
    The rolling back process was easy, restored from a point prior to installing Lion and Mavericks and the only issue was my iPhoto libraries. Thank my stars that I still had back ups that I had not converted yet.... viva la Mavericks...NOT. Apple can keep it.
    Unsure if you are just venting or if there is supposed to be a question here. Basically, I assumed this to be Apple's idea of an improvement. That is, I really believe the ProRes 422 codec is a better intermediate codec than the AIC codec but most of my old HDV camcorder family tapes were imported by iMovie (for compatibility with my wife's non-FCP computer configuration) and, like your content, is/remains stored as AIC/PCM MOV files. At first I thought this might be a generalized change affecting all QT X based apps but when I went to check the latest iMovie v10.0 update, became confused when I noted that AIC source files were not automatically updated to ProRes 422 and continue to play natively in the iMovie source media viewer.
    I guess this is supposed to be a logical evoluption and we were supposed to have seen the "handwriting on the wall" dating back to when Apple's first released the free ProRess "player" ProRes 422 codec. Still, it would have been nice if Apple had given some warning during the last few years so users could plan and prepare for such a drastic change. For the moment, I am just thankful that AIC remains, at least temporarily, supported nativelyby the iMovie video editor under Mavericks. Thank goodness for small favors.

  • Firefox saving double version of the same webpage in a single file

    About one year back, I saved a webpage as webpage complete, that is, as a HTML file and a folder containing associated files. Recently I added mozilla archive format add-on. I revisited the webpage and it has changed a little bit, for example the picture in the heading and another picture in the body of the page. Now I saved this changed webpage as a single file, in MHT format. Now when I am opening the MHT file it is showing the previous version of the webpage, and at the top it is showing 'saved from: file:///G:/Document/Religion/filename'. When I move the file in another drive or folder firefox opens the changed version of the webpage and at the top 'Saved from: http://mukto-mona.com/bangla_blog/?p=28719, that is url of the webpage. When I move the file in G it again shows the old version. One word more, I downloaded all files and temporarily saved them in C drive. Later I moved them elsewhere. As you can see this above file I saved in G drive. I tried clearing cookies and histories of firefox and browsing history in Windows internet options. Problem is not going. I do not know whether it is a cookie problem, but I placed the question here.
    Though I mentioned about a single saved file just for instance, actually the problem showing for several files. Thanks in advance.

    Please read '''''About this Add-on''''' on the download page. <br />
    https://addons.mozilla.org/en-US/firefox/addon/mozilla-archive-format/
    Also, documentation for MAF is available here: <br />
    http://maf.mozdev.org/documentation.html
    I can't help you with MAF, I use UnMHT myself. <br />
    https://addons.mozilla.org/en-US/firefox/addon/unmht/

Maybe you are looking for

  • Video shows without sound

    Hi, I just bought an IPod - 30 Gb, it was working fine until I tryed to play some videos with it, it takes forever to convert a video but after it was done I transfered it to the Ipod, the video shows up fine but no sound is coming off the headphones

  • PSE 7 Organizer crash/stall/fail

    I've been using PSE 7 Organizer in Windows XP without problems for quite awhile. Recently, the program locks up on the first image in the library. The hourglass shows and it says "generating thumbnails," yet nothing seems to happen. I generally have

  • Tcode to send custom data using custom message type in ALE

    I have ceated custom message type and i want to send data to say system B.I wanted to know Tcode to send custom data using custom message type in ALE.   for example: material data...message type = matmas....tcode = BD10. like this.   i hope you have

  • Async call gets stuck with pending status

    Hi, I am working on Tasklayer where need to invoke Async. call, the .bpel file has Invoke activity and below that it has pick activity with branches one for OnMessage and another is also OnMessage but, this is for fault. Now, when it invokes the Asyn

  • Is it possible to monitor all calls into all EJBs deployed on a server?

    Is there any way of monitoring all calls into the EJBs deployed in a server? I'd like to be able to externally log the calls, and perhaps do some monitoring at the call level, without modifying the EJBs themselves. Something along the lines of servle