Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo zusammen,

also ich arbeit noch mit ASP. Meine Aufgabe besteh darin einen Filedownload zur Verfügung zu stellen. Habe ich auch schon gemacht und läuft soweit auch ganz gut.

sFileName = objASPSmartUpload.Form("Download")

sFile = Server.MapPath("\" & Application("Kasse") & "\Daten") & "\" & sFileName

Response.Clear

Response.ContentType = "txt/plain"

Response.AddHeader "Content-Disposition", "attachment;filename=" & sFileName

Set oFso = Server.CreateObject("Scripting.FileSystemObject")

Set oByteSize = oFso.GetFile(sFile)

sErstellung = Mid(oByteSize.DateCreated, 7, 4) & Mid(oByteSize.DateCreated, 4, 2) & Mid(oByteSize.DateCreated, 1, 2)

bByteSize= oByteSize.Size + 1

Set oByteSize = Nothing

Set oStream = oFso.OpenTextFile(sFile, 1, false, -1)

bBinContent = oStream.Read(bByteSize)

Set oStream = Nothing

Response.BinaryWrite(bBinContent)

Response.End

Mein Problem stellt sich nun folgendermaßen dar: Ich habe z. B. ein ZIP-File mit der Größe von 740 KB, dieses File kann ich komplett herunterladen. Hat das File aber eine Größe von 741 werden nur 740 Kb heruntergeladen. Weiterhin habe ich ein File mit 1350 KB nach dem Download hat es nur noch 1348.

Ich konnte feststellen, dass

bBinContent = oStream.Read(bByteSize)

zwar bByteSize die richtige Größe hat, aber dennoch nicht alles geschieben wird. Ich konnte weiterhin feststellen, dass wenn ich für bByteSize z. B. 5 übergeben, 10 Byte geschrieben werden.

Hat einer von Euch eine Ahnung wie ich diesen Umstand beheben kann?

Danke

Matthias

Sind die Dateien denn korrupt oder nur unterschiedliche gross? Weil letzteres kann auch durch unterschiedliche Filesysteme zustande kommen.

Hallo,

denke nicht das die Dateien korrupt sind, sie sind aber immer unterschiedlich groß.

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.