Forbid the upload of files bigger than the memory backend capacity

This commit is contained in:
Anis Elleuch committed 2015-05-28 22:07:02 +01:00
1 parent ab80057c5c
commit d360d0fec3
3 files changed
+25 -8

No files matched your search

+9
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