danialfarid / ng-file-upload

Lightweight Angular directive to upload files with optional FileAPI shim for cross browser support
MIT License
7.87k stars 1.59k forks source link

Missing width and height in the upload return object #2150

Open imverayz opened 2 years ago

imverayz commented 2 years ago

Hi! We are using this ng-file-upload module to upload image files. I think we are expecting image width and height data in the data object returned, but are not seeing them. Any insight would be appreciated!

Here is the relevant code:

const uploader = Upload.upload({
            url: `${imageServerURL}/upload/${uuid ? uuid : ''}`,
            withCredentials: false,
            headers: { session },
            data: {
                metadata: metadata ? JSON.stringify(metadata) : undefined,
                file,
            }
        }).success((data, status, headers, config) => {
            resolve({ data, status, headers, config });
        }).error((data, status, headers, config) => {
            reject({ data, status, headers, config });
        });