jottalib icon indicating copy to clipboard operation
jottalib copied to clipboard

make md5 and dates attributes optional when uploading to jottacloud

Open ttyridal opened this issue 8 years ago • 6 comments

and they should be allowed to be None (ie not send them). Seems like the jotta servers only actually requires JSize

[updated: They should be possible to not send because jotta will then complete the fields for us. This is of particular interest on md5. When we specify md5 in the post, jotta servers will do verification and mark the file as corrupt. Without the md5 it will always accept the file and we can do the comparison on our end. ]

Maybe allow for specifying size and accept generators as the fileobject when at it?

The apparent use-case here is on the fly encryption.

ttyridal avatar Feb 02 '16 20:02 ttyridal

@ttyridal, This is really interesting, have you tested this? It would allow for all kinds of interesting uses.

havardgulldahl avatar Jun 11 '16 06:06 havardgulldahl

it's related to Issue #100

I did some research/testing to confirm that it's working before the priorities shifted.

ttyridal avatar Jun 11 '16 07:06 ttyridal

I'm hoping this will fix #11, too.

Looking into it.

havardgulldahl avatar Jun 11 '16 16:06 havardgulldahl

@ttyridal FWIW, I'd be happy to see your testing code, if there is anything we can use in jottalib. Maybe put up a gist, perhaps?

havardgulldahl avatar Jun 12 '16 19:06 havardgulldahl

@ttyridal I absolutely get why setting the md5 hash to None is really helpful, but what's the advantage of omitting the date?

havardgulldahl avatar Jun 16 '16 19:06 havardgulldahl

Date must be specified as an argument if the source is not a file. I don't really remember if this is the reason, but typical case would be time.now(). might as well provide that as a default. ie None = mdate if a file, time.now() otherwise.

ttyridal avatar Jun 16 '16 20:06 ttyridal