Skip to content

Version 8.0.1

Compare
Choose a tag to compare
@danialfarid danialfarid released this 26 Sep 23:18
· 280 commits to master since this release

Fixed #1027, #1028, #1023, #948, #855, #1016, #1024, redone data option

Migration Notes:

  • fields and file upload options are deprecated and replaced with data option:

    {data: {user: user, file: file}} instead of {fields:{user: user}, file: file}
  • sendFieldsAs is removed and replaced with Upload.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 and fileName upload options are removed and formDataAppender is deprecated

    {data: {fileKey: Upload.rename(file, 'a.jpg')} instead of {file: file, fileFormDataName:'fileKey', fileName: 'a.jpg'}

    You can also use objectKey and arrayKey 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 to ngf-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.