Forbid the upload of files bigger than the memory backend capacity

This commit is contained in:
Anis Elleuch
2015-05-28 19:33:35 +01:00
parent ab80057c5c
commit d360d0fec3
3 changed files with 25 additions and 8 deletions

View File

@@ -18,6 +18,10 @@ package drivers
import "fmt"
// InternalError - generic internal error
type InternalError struct {
}
// BackendError - generic disk backend error
type BackendError struct {
Path string
@@ -127,6 +131,11 @@ func EmbedError(bucket, object string, err error) ImplementationError {
}
}
// Return string an error formatted as the given text
func (e InternalError) Error() string {
return "Internal error occured"
}
// Return string an error formatted as the given text
func (e ObjectNotFound) Error() string {
return "Object not Found: " + e.Bucket + "#" + e.Object