#NEWLINE# def deserialize_upload( value , url ) : #NEWLINE# #INDENT# '\n    Restore file and name and storage from serialized value and the upload url.\n    ' #NEWLINE# result = { #NEWLINE# #INDENT# 'name' : None , #NEWLINE# 'storage' : None , #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# result = signing . loads ( value , salt = url ) #NEWLINE# #UNINDENT# except signing . BadSignature : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# result [ 'storage' ] = get_storage_class ( result [ 'storage' ] ) #NEWLINE# #UNINDENT# except ( ImproperlyConfigured , ImportError ) : #NEWLINE# #INDENT# result = { #NEWLINE# #INDENT# 'name' : None , #NEWLINE# 'storage' : None , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# #UNINDENT# return result