Help - Search - Members - Calendar
Full Version: File Upload Component
hsc message board > Main > hsc Software Support
Naveen Kumar
I have downloaded the File Upload component and it is working fine. But I'm unable to specify the folder into which the files have to be uploaded. By default it is uploading the files into D:\DODAAC182 folder. Any support is greatly appreciated.

Thank You.

Cheers,
smile.gif Naveen.
Jeff Hendrickson
Hi Naveen,

Does this sample code help??

'
' Sample HTML demonstrates use of File Upload Component
'
<HTML>
<BODY>
<FORM ACTION="UploadExt.dll" ENCTYPE="multipart/form-data" METHOD=POST>
Enter server file to create: <INPUT TYPE=TEXT NAME=Filename><BR>
What file are you sending? <INPUT TYPE=FILE NAME=Filedata><BR>
<INPUT TYPE=SUBMIT NAME=Upload>
</FORM>
</BODY>
</HTML>

The file the component will create on the server is reflected in the Filename variable demonstrated above.

I hope this helps...

Regs,
-Jeff Hendrickson ph34r.gif
Naveen Kumar
Hi! Jeff,

Thanks for the response. Actually the Filename variable that you are referring to will only represent the name of the file that we are going to upload on to the server. But the folder into which the file has to be uploaded is hardcoded in the UploadExt.dll file as D:\DODAAC182. Now how can I edit this DLL and change the path?

Warm Regards,
Naveen Kumar.
Jeff Hendrickson
Hi Naveen,

From the example:

Enter server file to create: <INPUT TYPE=TEXT NAME=Filename><BR>

If the INPUT Filename contains C:\JEFF\TEST.TXT then the upload component will create the file C:\JEFF\TEST.TXT on the server.

Please let me know if you have any questions.

Regs,
-Jeff ph34r.gif
Naveen Kumar
Hi! Jeff,

Thanks again. Lemme take the same example that you are referring to. If the INPUT Filename contains C:\JEFF\TEST.TXT, then the upload component is creating a file 29_7_2004_9516C__JEFF_TEST.txt in the folder D:\DODAAC182. That is the file name will be a combination of the date, time, year, and the path of the file. This is perfectly alright. But the issue here is, this file that is created can only be uploaded into D:\DODAAC182 folder. So, if this folder doesn't exist on the server the file won't be saved. I want to customize the folder on the server into which the file has to be uploaded. How can I do this?

Thanks.

Warm Regards,
Naveen Kumar.
Jeff Hendrickson
Hi Naveen,

Thanks for the feedback. Let me look into this, and I'll come up with an answer for you. I haven't looked at this code for over a year, so give me a day or two.

Regs,
-Jeff ph34r.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.