PDA

View Full Version : Huge ASP Upload whitepaper



DavidMartinko
16-Sep-2008, 04:39 PM
This whitepaper is out of date. I have made the required changes and it will
only upload a single file.

------------------- begin snip --------------------
<!-- #INCLUDE file="../Include/ModalTop.inc" -->
<!--ajax support -->
<script type="text/javascript"
src="../Include/Javascript/xmlHttpRequest.js"></script>
<!--//-->
<%
iObjectId = request("objectid")
sWindowType = request("windowtype")
iErr = 0

Dim DestinationPath, sPath
DestinationPath = oFile.call("Get_GetFullPath", iObjectId)

'Dim Form: Set Form = New ASPForm %><!--#INCLUDE
FILE="../Include/upload.inc"--><%
Dim Form: Set Form = Server.CreateObject("ScriptUtils.ASPForm")
Server.ScriptTimeout = 20000
'Form.SizeLimit = &H900000
Form.SizeLimit = 2000*&H100000 ' 2GB

If Form.State = 0 Then 'Completed
Form.Files.Save DestinationPath

For Each File In Form.Files.Items
if len(File.FileName)> 0 then 'File is specified.
sFile = File.FileName
iFileNumber = Mid(File.name, 5)
sCheckboxName = "file" & iFileNumber & "row1Exist"
iOverwrite = Form(sCheckboxName)

iPointpos = InstrRev(sFile, ".",-1, 1)
If (iPointpos > 0) Then
sName = Trim(left(sFile,iPointpos-1))
sExtension = mid(sFile,iPointpos+1)
File.FileName = oFile.call("Get_CombinedFileName",
sName, sExtension) <---- Errors on this line....
Else
------------------- end snip --------------------

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'FileName'

/electos/Tools/FileAdd.asp, line 33

Edwin van der Velden
17-Sep-2008, 02:45 AM
Hi David,

We're aware that some (or most) Electos whitepapers are out of date. I plan
to bring up this issue for our next Electos release and hopefully we find
someone who can check and update them. The nexct Electos version will have
better multi file upload support and theoretically als no file size limit
which I think you are looking for?


Regardsm

Edwin

"David Martinko" <DavidM@RedeemedSoftware.com> wrote in message
news:0pLDBUEGJHA.1980@dacmail.dataaccess.com...
> This whitepaper is out of date. I have made the required changes and it
> will
> only upload a single file.
>
> ------------------- begin snip --------------------
> <!-- #INCLUDE file="../Include/ModalTop.inc" -->
> <!--ajax support -->
> <script type="text/javascript"
> src="../Include/Javascript/xmlHttpRequest.js"></script>
> <!--//-->
> <%
> iObjectId = request("objectid")
> sWindowType = request("windowtype")
> iErr = 0
>
> Dim DestinationPath, sPath
> DestinationPath = oFile.call("Get_GetFullPath", iObjectId)
>
> 'Dim Form: Set Form = New ASPForm %><!--#INCLUDE
> FILE="../Include/upload.inc"--><%
> Dim Form: Set Form = Server.CreateObject("ScriptUtils.ASPForm")
> Server.ScriptTimeout = 20000
> 'Form.SizeLimit = &H900000
> Form.SizeLimit = 2000*&H100000 ' 2GB
>
> If Form.State = 0 Then 'Completed
> Form.Files.Save DestinationPath
>
> For Each File In Form.Files.Items
> if len(File.FileName)> 0 then 'File is specified.
> sFile = File.FileName
> iFileNumber = Mid(File.name, 5)
> sCheckboxName = "file" & iFileNumber & "row1Exist"
> iOverwrite = Form(sCheckboxName)
>
> iPointpos = InstrRev(sFile, ".",-1, 1)
> If (iPointpos > 0) Then
> sName = Trim(left(sFile,iPointpos-1))
> sExtension = mid(sFile,iPointpos+1)
> File.FileName = oFile.call("Get_CombinedFileName",
> sName, sExtension) <---- Errors on this line....
> Else
> ------------------- end snip --------------------
>
> Microsoft VBScript runtime error '800a01b6'
>
> Object doesn't support this property or method: 'FileName'
>
> /electos/Tools/FileAdd.asp, line 33
>
>

Pepe
17-Sep-2008, 05:36 AM
[and theoretically als no file size limit which I think you are looking for?]

We do ;-)



Edwin van der Velden dijo lo siguiente el 17/09/2008 9:45:

>Hi David,
>
>We're aware that some (or most) Electos whitepapers are out of date. I plan
>to bring up this issue for our next Electos release and hopefully we find
>someone who can check and update them. The nexct Electos version will have
>better multi file upload support and theoretically als no file size limit
>which I think you are looking for?
>
>
>Regardsm
>
>Edwin
>
>"David Martinko" <DavidM@RedeemedSoftware.com> wrote in message
>news:0pLDBUEGJHA.1980@dacmail.dataaccess.com...
>
>
>>This whitepaper is out of date. I have made the required changes and it
>>will
>>only upload a single file.
>>
>>------------------- begin snip --------------------
>><!-- #INCLUDE file="../Include/ModalTop.inc" -->
>><!--ajax support -->
>><script type="text/javascript"
>>src="../Include/Javascript/xmlHttpRequest.js"></script>
>><!--//-->
>><%
>> iObjectId = request("objectid")
>> sWindowType = request("windowtype")
>> iErr = 0
>>
>> Dim DestinationPath, sPath
>> DestinationPath = oFile.call("Get_GetFullPath", iObjectId)
>>
>> 'Dim Form: Set Form = New ASPForm %><!--#INCLUDE
>>FILE="../Include/upload.inc"--><%
>> Dim Form: Set Form = Server.CreateObject("ScriptUtils.ASPForm")
>> Server.ScriptTimeout = 20000
>> 'Form.SizeLimit = &H900000
>> Form.SizeLimit = 2000*&H100000 ' 2GB
>>
>> If Form.State = 0 Then 'Completed
>> Form.Files.Save DestinationPath
>>
>> For Each File In Form.Files.Items
>> if len(File.FileName)> 0 then 'File is specified.
>> sFile = File.FileName
>> iFileNumber = Mid(File.name, 5)
>> sCheckboxName = "file" & iFileNumber & "row1Exist"
>> iOverwrite = Form(sCheckboxName)
>>
>> iPointpos = InstrRev(sFile, ".",-1, 1)
>> If (iPointpos > 0) Then
>> sName = Trim(left(sFile,iPointpos-1))
>> sExtension = mid(sFile,iPointpos+1)
>> File.FileName = oFile.call("Get_CombinedFileName",
>>sName, sExtension) <---- Errors on this line....
>> Else
>>------------------- end snip --------------------
>>
>>Microsoft VBScript runtime error '800a01b6'
>>
>>Object doesn't support this property or method: 'FileName'
>>
>>/electos/Tools/FileAdd.asp, line 33
>>
>>
>>
>>
>
>
>
>