Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Backups Failure on File Branch #11

Closed
BMCSamael opened this issue Mar 13, 2013 · 7 comments
Closed

Backups Failure on File Branch #11

BMCSamael opened this issue Mar 13, 2013 · 7 comments

Comments

@BMCSamael
Copy link

The DB works great!

Default Database backed up successfully to BFI-2013-03-12T23-31-06 in destination Dropbox in 6598.73 ms.

The File Backup does not
Could not run backup because the file could not be saved to the destination.

They are the same destination same config.

@BMCSamael
Copy link
Author

Backups work with Download and Manual File Directory

It appears it might be because its too big. But its not hitting the error on the MB limit in code.

@hakre
Copy link
Collaborator

hakre commented Mar 13, 2013

@BMCSamael Can you write how large (in bytes) the file that failed to upload was?

@BMCSamael
Copy link
Author

it was 600MB due to the photos. While i have plenty of dropbox space we can suffice its too big to succeed. I didn't see the error though

@BMCSamael BMCSamael reopened this Mar 16, 2013
@hakre
Copy link
Collaborator

hakre commented Mar 17, 2013

With the current version you should get an exception of type Exception before the upload is done. As the exceptions are not typed and the include is single-class only (and I don't want to change that for the moment) what I could offer is to provide some error constants so that the code of an exception (not only it's message) can be checked like:

 ...

try {
    $uploader->upload($file);
} catch(Exception $e) {
    $code = $e->getCode();
    if ($code === DropboxUploader::CODE_FILESIZE_TOO_LARGE) {

    ...

Would that be useful?

@BMCSamael
Copy link
Author

I think it would be
On Mar 17, 2013 7:59 AM, "hakre" notifications@github.com wrote:

With the current version you should get an exception before the upload is
done. As the exceptions are not typed and the include is single-class only
(and I don't want to change that for the moment) what I could offer is to
provide some error constants so that the code of an exception (not only
it's message) can be checked like:

...

try {
$uploader->upload($file);
} catch(Exception $e) {
$code = $e->getCode();
if ($code === DropboxUploader::CODE_FILE_TOO_LARGE) {

...

Would that be useful?


Reply to this email directly or view it on GitHubhttps://github.com//issues/11#issuecomment-15021530
.

hakre added a commit to hakre/DropboxUploader that referenced this issue Mar 18, 2013
- Each Exception thrown now has an integer error-code.
- Each error-code has a DropboxUploader class-constant.
- Each error-code bitwise-and DropboxUploader::FLAG_DROPBOX_GENERIC equals TRUE.
- See Issue jakajancar#11
@hakre
Copy link
Collaborator

hakre commented Mar 18, 2013

In development version 1.1.10 you can find now error-codes with each exception.

The constant for your error-case is:

DropboxUploader::CODE_FILESIZE_TOO_LARGE

Please test the development version and let me know if and how it works out for you.

@hakre hakre closed this as completed Mar 18, 2013
@hakre hakre reopened this Mar 18, 2013
hakre added a commit to hakre/DropboxUploader that referenced this issue Mar 18, 2013
- Each Exception thrown now has an integer error-code.
- Each error-code has a DropboxUploader class-constant.
- Each error-code bitwise-and DropboxUploader::FLAG_DROPBOX_GENERIC equals TRUE.
- See Issue jakajancar#11
@hakre
Copy link
Collaborator

hakre commented Mar 18, 2013

Error codes are now in master, I'll close this issue for now. Feel free to re-open if you run into any issue with it.

@hakre hakre closed this as completed Mar 18, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants