SEARCH YOUR SOLUTION HERE  

Shadow Uploader - preventing user from uploading non image files

(regarding this thread: http://forums.aspfree.com/code-bank-...res-94647.html)

Originally Posted by Shadow Wizard this will not save non-image files. as for extension, I fear I didn't understand what you
mean - you try to save the file with different extension I disagree. I was able to upload an Excel Spreadsheet with no trouble at all.

Posted On: Friday 26th of October 2012 02:47:37 AM Total Views:  497
View Complete with Replies




Related Messages:

VBScipt: Call builtin functions shadowed by global variables   (290 Views)
VBScript on ASP Classic contains an "int" function. (It rounds numbers towards -8.) Suppose that some excessively "clever" coder has created a global variable named "int". Is there any way to get at the original function I've tried all manner of workarounds with scoping and dodgy execs, but no dice. I suspect that it is impossible, but I'm hoping that someone will know more about it than I do. EDIT:
Shadow uploader problem   (165 Views)
shadow, I am using your code to upload files doc, pdf. It gives me an error like this Microsoft VBScript runtime error '800a004c' Path not found /secure/ShadowUploader.asp, line 283 here is my code Code: Set objUpload=New ShadowUpload If objUpload.GetError"" Then Response.Write("sorry, could not upload: "&objUpload.GetError) Else For x=0 To objUpload.FileCount-1 txtpdffile=objUpload.File(x).FileName Call objUpload.File(x).SaveToDisk(Server.MapPath("Uploaddocuments"), "") Next End If
uploader with multi element form   (220 Views)
i need to find some scrit to uploadimages but with multi elements form i mean i need to put some textboxes and compo boxes with the uploading form to process the data entered in the text boxes and copbo boxes something = the posting new thread u can write ur thread and choose file to attach hope it's clear , it's working like a dream but how can i make some limit for file size i mean if the user tried 2 upload a file more than somw size he gets error messege also how can i change the files directory to a ub directory from the pages directory like images or download what ever thx alot jofa and jmi
ASP bulk file uploader script, zip or other method?   (163 Views)
ASP bulk file uploader script, zip or other method Any one know of such a script Also something that doesn't require any server side installing
file uploader   (164 Views)
Hi ! I've been having some trouble with a file uploader script, the script times out when running, I have tried extending the default timeout length. I have also tried a couple of other file upload scripts and thay all time out too. I can't seem to find a cause to the problem. I have a second server and it runs beautifully! If anyone has any ideas or solutions, I'd b grateful! thnx!!
Shadow uploader, expect word docs or pdfs only?   (160 Views)
hi could someone point me in teh right direction for the shadow uploader to only acccept .doc or .pdf if not dont upload cheers
Page 2 - Shadow uploader, expect word docs or pdfs only?   (171 Views)
well it works again but the filename is not changed :S EDIT heres my code Code: strFilePath = GetFirstAvailablePath(Server.MapPath( "/vivergo/cvs/" & objUpload.File(x).FileName )) Call objUpload.File(x).SaveToDisk("", strFilePath)
Shadow uploader   (230 Views)
I have used the Shadow Uploader from the code bank for uploading images will it work for if i am going to upload 10 pdf files Any idea todd
Shadow uploader?   (157 Views)
how can i make it so it only allows .jpeg,.jpgs, and .bmps to be uploaded thanx
How to attach recent uploaded file to mail with help of aspsmartuploader and cdonts?   (282 Views)
Hi , I have created an asp form which I want to use to retrieve attachment from my site users. I am using Aspupload Component on sever to upload attach file on server at specific location. Although I am able to upload attach file on server. Also I created to retrieve attachment from mail its not working. Can any one help me out to make form or code to retrieve uploaded file as attachment through mail. Here is file where user fill his information and attach his CV. Job Apply Pleae fill below form to apply job you wish Company Name  :    Position  :    Attach Resume  :    *    :    Contact Email  :    Cover Letter  :      Please help me out to make process form code to retrieve uploaded file and submitted information through mail. JIMI
cpshost.dll for image uploader   (212 Views)
Im building an image uploader to be used so that a client can upload images from their desktop to the site. Is it correct that I have to download the cpshost.dll from microsoft and then upload that file in a folder named for instance Scripts, so that the form is able to upload images before moving onto the processing asp page (manageproducts.asp). My URL is as follows: http://domain714858.sites.fasthosts....geproducts.asp Am I right what I think cheers lee
uploader with multi element form   (191 Views)
i need to find some scrit to uploadimages but with multi elements form i mean i need to put some textboxes and compo boxes with the uploading form to process the data entered in the text boxes and copbo boxes something = the posting new thread u can write ur thread and choose file to attach hope it's clear , it's working like a dream but how can i make some limit for file size i mean if the user tried 2 upload a file more than somw size he gets error messege also how can i change the files directory to a ub directory from the pages directory like images or download what ever thx alot jofa and jmi
file uploader   (204 Views)
Hi ! I've been having some trouble with a file uploader script, the script times out when running, I have tried extending the default timeout length. I have also tried a couple of other file upload scripts and thay all time out too. I can't seem to find a cause to the problem. I have a second server and it runs beautifully! If anyone has any ideas or solutions, I'd b grateful! thnx!!
Multiple image uploader - problem uploading a single image   (220 Views)
Basically what I've got is a problem when I'm trying to upload an image in an 'edit' page via the cms.I have 6 images that are uploaded fine via a 'add product' page, then when I go to my edit page and for example change 1 of those images of the 6 and upload that, I get problems, but all is fine if when im in the 'edit' page I change another piece of data and submit.I have included below the 2 pages that are used when 'editing' a selection.IF NOT rsuserU.EOF THENartTitle = rsuserU( "art_Title" )artCategory = rsuserU( "art_Category" )artBriefDesc = rsuserU( "art_BDescription" )artPrice = rsuserU( "art_Price" )artPicFull = rsuserU( "art_ThumbFull" )artFace = rsuserU( "art_ThumbFace" )artHood = rsuserU( "art_ThumbHood" )artExtra1 = rsuserU( "image_Extra1" )artExtra2 = rsuserU( "image_Extra2" )artExtra3 = rsuserU( "image_Extra3" )artCaseDesc = rsuserU( "case_Text" )artDialDesc = rsuserU( "dial_Text" )artMovementDesc = rsuserU( "movement_Text" )artMakerDesc = rsuserU( "maker_Text" )artDatDesc = rsuserU( "dat_Text" )artHeightDesc = rsuserU( "height_Text" )artStatus = rsuserU( "art_Status" )artMoonDisplay = rsuserU( "art_MoonDisplay" )artDisplay = rsuserU( "art_Display" )END IFrsuserU.CloseFUNCTION SELECTED( firstVal, secondVal ) IF cSTR( firstVal ) = cSTR( secondVal ) THEN SELECTED = " SELECTED " END IFEND FUNCTION%> Edit or Update Clock Information: Title: Category: Longcase Mahogany Longcase Oak Longcase Walnut Longcase Marquetry Longcase Lacquer Longcase Miscellaneous Other clocks and instruments Barometers Restoration Longcase Mahogany Archive Longcase Oak Archive Longcase Walnut Archive Longcase Marquetry Archive Longcase Lacquer Archive Longcase Miscellaneous Archive Other clocks and instruments Archive Barometers Archive Brief Description: Price: Please note! When changing an image, you have to change or re-load all 6 Current Full Length Clock Picture:   New Full Length Clock Picture: Current Clock Face Picture:   New Clock Face Picture: Current Clock Hood Picture:   New Clock Hood Picture: Current Extra Picture 1:   New Extra Picture 1: Current Extra Picture 2:   New Extra Picture 2: Current Extra Picture 3:   New Extra Picture 3: Please note! When changing an image, you have to change or re-load all 6 Case Description: Dial Description: Movement Description: Maker Description: Date Description: Height Description: Status: IN STOCK SOLD Moon Image Display: YES NO Display: YES NO Back This is then submitted here:if instr(Trim(Request.ServerVariables("HTTP_REFERER")),"addproduct_art.asp") or instr(Trim(Request.ServerVariables("HTTP_REFERER")),"updateproduct_art.asp") then Set Upload = Server.CreateObject("Persits.Upload") theCount = upload.save(server.mappath("..")&"\images\uploaded") dim arr(6), i i = 1 For Each File in Upload.Files arr(i) = File.FileName i = i + 1 Next 'Count = Upload.SaveVirtual("../upload") ' Get the form variables addProduct = TRIM (Upload.Form("addProduct")) updateProduct = TRIM (Upload.Form("updateProduct")) deleteProduct = TRIM (Upload.Form("deleteProduct")) 'response.write("delete=" & deleteProduct) delID = TRIM (Upload.Form("delID")) catID = TRIM (Upload.Form("catID")) artTitle = TRIM (Upload.Form("artTitle")) artCategory = TRIM (Upload.Form("artCategory")) artBriefDesc = TRIM (Upload.Form("artBriefDesc")) artPrice = TRIM (Upload.Form("artPrice")) artPicFull = TRIM (arr(1)) artFace = TRIM (arr(2)) artHood = TRIM (arr(3)) artExtra1 = TRIM (arr(4)) artExtra2 = TRIM (arr(5)) artExtra3 = TRIM (arr(6)) artCaseDesc = TRIM (Upload.Form("artCaseDesc")) artDialDesc = TRIM (Upload.Form("artDialDesc")) artMovementDesc = TRIM (Upload.Form("artMovementDesc")) artMakerDesc = TRIM (Upload.Form("artMakerDesc")) artDatDesc = TRIM (Upload.Form("artDatDesc")) artHeightDesc = TRIM (Upload.Form("artHeightDesc")) artStatus = TRIM (Upload.Form("artStatus")) artMoonDisplay = TRIM (Upload.Form("artMoonDisplay")) artDisplay = TRIM (Upload.Form("artDisplay")) origImage = TRIM(upload.Form("origImage")) origFImage = TRIM(upload.Form("origFImage")) origHImage = TRIM(upload.Form("origHImage")) origExtra1 = TRIM(upload.Form("origExtra1")) origExtra2 = TRIM(upload.Form("origExtra2")) origExtra3 = TRIM(upload.Form("origExtra3")) set upload = nothing 'Assign Default Values IF artTitle = "" THEN artTitle = " " END IF IF artCategory = "" THEN artCategory = " " END IF IF artBriefDesc = "" THEN artBriefDesc = " " END IF IF artPrice = "" THEN artPrice = " " END IF IF artCaseDesc = "" THEN artCaseDesc = " " END IF IF artDialDesc = "" THEN artDialDesc = " " END IF IF artMovementDesc = "" THEN artMovementDesc = " " END IF IF artMakerDesc = "" THEN artMakerDesc = " " END IF IF artDatDesc = "" THEN artDatDesc = " " END IF IF artHeightDesc = "" THEN artHeightDesc = " " END IF IF artStatus = "" THEN artStatus = " " END IF IF artMoonDisplay = "" THEN artMoonDisplay = " " END IF IF artDisplay = "" THEN artDisplay = " " END IF ' Add new product if artPicFull = "" then Pimage = origImage else Pimage = artPicFull end if if artFace = "" then Fimage = origFImage else Fimage = artFace end if if artHood = "" then Himage = origHImage else Himage = artHood end if if artExtra1 = "" then Extra1 = origExtra1 else Extra1 = artExtra1 end if if artExtra2 = "" then Extra2 = origExtra2 else Extra2 = artExtra2 end if if artExtra3 = "" then Extra3 = origExtra3 else Extra3 = artExtra3 end if if addProduct "" then strsqlM = "INSERT INTO eventDisplay " &_ "( art_Title, art_Category, art_BDescription, art_Price, art_ThumbFull, art_ThumbFace, art_ThumbHood, image_Extra1, image_Extra2, image_Extra3, case_Text, dial_Text, movement_Text, maker_Text, dat_Text, height_Text, art_Status, art_MoonDisplay, art_Display ) VALUES (" &_ " '" & fixQuotes (artTitle ) & "', " &_ " '" & fixQuotes (artCategory ) & "', " &_ " '" & fixQuotes (artBriefDesc ) & "', " &_ " '" & fixQuotes (artPrice ) & "', " &_ " '" & fixQuotes (artPicFull ) & "', " &_ " '" & fixQuotes (artFace ) & "', " &_ " '" & fixQuotes (artHood ) & "', " &_ " '" & fixQuotes (artExtra1 ) & "', " &_ " '" & fixQuotes (artExtra2 ) & "', " &_ " '" & fixQuotes (artExtra3 ) & "', " &_ " '" & fixQuotes (artCaseDesc ) & "', " &_ " '" & fixQuotes (artDialDesc ) & "', " &_ " '" & fixQuotes (artMovementDesc ) & "', " &_ " '" & fixQuotes (artMakerDesc ) & "', " &_ " '" & fixQuotes (artDatDesc ) & "', " &_ " '" & fixQuotes (artHeightDesc ) & "', " &_ " '" & fixQuotes (artStatus ) & "', " &_ " " & fixQuotes (artMoonDisplay ) & ", " &_ " " & fixQuotes (artDisplay ) & " )" 'rsuser.open strsql, conn On Error Resume NextConnM.Execute strsqlMIf Err 0 Then Response.Write "Error in query " & strsqlM Response.EndEnd If end if %> Clock Title: Category: Brief Description: Price: Picture of full length:   Picture of the face:   Picture of the hood:   Extra Image 1:   Extra Image 2:   Extra Image 3:   Case Description:   Dial Description:   Movement Description:   Maker Description:   Date Description:   Height Description:   Status: Moon Display:   Display:   Was added to the database
asp uploader   (161 Views)
Hi all,I have PWS running on a windows 98 machine. I am trying to get something to make an upload via html/asp but everything i try is not working (looked on net for code).Could it be that i dont have access to the server from htmlHow do i give it access if so If it isnt this, what could it beTIADan ----------------------------------------There are 2 types of computer, the prototype and the obsolete!!
File uploader   (209 Views)
,I was wondering if anyone could advise me on the best way forward with a potential piece of development I am facing.I would like a user to be able to locate an image stored on their machine and for that image to be copied across to a location on a directory on the web server. I would prefer to do this via an ASP page.I am unsure of the best place to start, and so if anyone has any pointers/ helpful references etc etc they would be much appreciated
Upload pdfs shadow script   (281 Views)
I am uploading 12 pdfs using shadow upload script here is my code Code: Set objUpload=New ShadowUpload If objUpload.GetError"" Then Response.Write("Sorry, could not upload: "&objUpload.GetError) Else For x=0 To objUpload.FileCount-1 Call objUpload.File(x).SaveToDisk("F:\Inetpub\WWWRoot\pdfs\", "") Next End If How do i get the names of the pdfs there will not always be 12 pdfs sometimes there will be 2 sometimes 5 any idea
Shadow uploader ??   (233 Views)
i'm having a problem with end users submitting more then one photo for there number, the problem is it doesn't rename the second file. it only renames the first file they upload. is there a way to have the second file renamed 71b.jpg or something like that. instead of just uploading it with out renaming it
Error when using shadow uploader   (301 Views)
I have a login page where user enters his username password i verify if he is a valid user or not if he is i redirect him to a diff page and in querystring i transfer 3 variables ok I get the 3 variables on that page then i have 3 radio buttons when user selects one of them i display the company name and they upload the file and some stas for the company the client requirement is when the user submits the form it should be done by radio button not a submit button for uploading of file i have used shadow's code here is my problem if the user doesnt upload a file it gives me an error saying Microsoft VBScript runtime error '800a01a8' Object required: 'm_Request' /ERP/onlineerp/ShadowUploader.asp, line 27 here is the code for it [CODE] Company Details Country U.S.A Canada International Company name Stats Upload File /> now i have the code for submitcompany.asp Code: