You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we try to serve a resumable object (like an audio file), ObjectOpenFile cannot Seek directly to the end.
Because in http.ServeContent size is determined that way: size, err := content.Seek(0, io.SeekEnd)
We just add one return as a quickfix in swift.go
func (file *ObjectOpenFile) Seek(offset int64, whence int) (newPos int64, err error) {
switch whence {
case 0: // relative to start
newPos = offset
case 1: // relative to current
newPos = file.pos + offset
case 2: // relative to end
if !file.lengthOk {
return file.pos, newError(0, "Length of file unknown so can't seek from end")
}
newPos = file.length + offset
**return**
default:
The text was updated successfully, but these errors were encountered:
So are you suggesting that we treat the Seek(0, io.SeekEnd) as a special case as it is only used to find the size of the file and avoid doing the re-opening of the file.
When we try to serve a resumable object (like an audio file), ObjectOpenFile cannot Seek directly to the end.
Because in http.ServeContent size is determined that way:
size, err := content.Seek(0, io.SeekEnd)
We just add one return as a quickfix in swift.go
The text was updated successfully, but these errors were encountered: