Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canot upload p12 file #4328

Closed
thinhnk opened this issue May 19, 2020 · 3 comments
Closed

Canot upload p12 file #4328

thinhnk opened this issue May 19, 2020 · 3 comments

Comments

@thinhnk
Copy link

thinhnk commented May 19, 2020

I use loopback 3 for my project.
I trying to upload a p12 file. But now LB3 can't get filemime of file. Filemime is null.
Before is the response that i console log in node_modules\loopback-component-storage\lib\storage-handler.js, function form.handlePart

File to upload https://gofile.io/d/rYRJAq


Stream {                                                                                                                                                                                                           
  _events: [Object: null prototype] {},                                                                                                                                                                            
  _eventsCount: 0,                                                                                                                                                                                                 
  _maxListeners: undefined,                                                                                                                                                                                        
  readable: true,                                                                                                                                                                                                  
  headers: {                                                                                                                                                                                                       
    'content-disposition': 'form-data; name="image"; filename="covid.p12"',                                                                                                                                        
    'content-length': '3339'                                                                                                                                                                                       
  },                                                                                                                                                                                                               
  name: 'image',                                                                                                                                                                                                   
  filename: 'covid.p12',                                                                                                                                                                                           
  mime: null,                                                                                                                                                                                                      
  transferEncoding: 'binary',                                                                                                                                                                                      
  transferBuffer: ''                                                                                                                                                                                               
}                                                                                                                                                                                                                  
Error: contentType "null" is not allowed (Must be in [image/gif, image/jpeg, image/jpeg, image/png, image/tiff, image/tiff, text/plain, application/pdf, application/json, application/x-pem-file, application/x-x5
09-ca-cert, application/x-pkcs12, application/x-pkcs7-certificates, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/msword, application/vnd.openxmlformats
-officedocument.wordprocessingml.document, application/octet-stream])                     
@thinhnk thinhnk added the bug label May 19, 2020
@youknowme09
Copy link

youknowme09 commented May 22, 2020

@thinhnk I think its not a bug.
How do you request to upload a file?
below is my test screen capture
擷取

@stale
Copy link

stale bot commented Jul 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 25, 2020
@stale
Copy link

stale bot commented Aug 8, 2020

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

@stale stale bot closed this as completed Aug 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants