Version 8.0.1
Fixed #1027, #1028, #1023, #948, #855, #1016, #1024, redone data option
Migration Notes:
fields
andfile
upload options are deprecated and replaced withdata
option:
{data: {user: user, file: file}}
instead of{fields:{user: user}, file: file}
sendFieldsAs
is removed and replaced withUpload.json(val)
,Upload.jsonBlob(val)
{data: user: Upload.jsonBlob(user)}
instead of{fields: {user: user}, sendFieldsAs:'json-blob'}
{data: user: Upload.json(user)}
instead of{fields: {user: user}, sendFieldsAs:'json'}
{data: user: user}
instead of{fields: {user: user}, sendFieldsAs:'form'}
fileFormDataName
andfileName
upload options are removed andformDataAppender
is deprecated
{data: {fileKey: Upload.rename(file, 'a.jpg')}
instead of{file: file, fileFormDataName:'fileKey', fileName: 'a.jpg'}
You can also useobjectKey
andarrayKey
options to control how the data is being added to the formData and specify the key pattern for them. See the readme file for samples.- added
pattern
option tongf-drag-over-class
to specify the pattern only for drag over class. - added
ngf-valid-only
directive to assign only the valid files to the model or change functions. - added 'ngf-reset-on-click` back to disable removing the file on click. This could cause cross browser compatibility issues so test cross browser before setting it to false.
- added