support Range request from HTTP Header #386

Closed
opened 2026-01-19 18:30:07 +00:00 by michael · 2 comments
Owner

Originally created by @johnko on GitHub.

Hi,

If you want to support Range requests, the easy way is you need something like

http.ServeContent(w, r, filename, modTime, seeker)

in your getHandler instead of the io.Copy.

This will allow seeking for media files.

Originally created by @johnko on GitHub. Hi, If you want to support Range requests, the easy way is you need something like ``` http.ServeContent(w, r, filename, modTime, seeker) ``` in your `getHandler` instead of the io.Copy. This will allow seeking for media files.
Author
Owner
@johnko commented on GitHub: example in my fork https://github.com/johnko/wtfc/blob/master/transfersh-server/handlers.go#L612-631
Author
Owner

@paolafrancesca commented on GitHub:

@johnko storage.Seeker seems to be suitable only for local storage

@paolafrancesca commented on GitHub: @johnko `storage.Seeker` seems to be suitable only for local storage
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dutchcoders/transfer.sh#386