1279
Views
11
Comments
get mime type from upload file
Question

how to get mime type after uploading some file in  mobile apps ?

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Robby,

What are you using for the upload?

UserImage.jpg
robby duta

hi Kilian,

image

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Robby,

Unfortunately, the image seems missing.

UserImage.jpg
robby duta

So,I can't get the image's mime type ?

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Robby,

Sorry, I thought you included an image to show what you did, I didn't get you uploading an image. So let me rephrase: what does the code look like that you use for uploading files?

UserImage.jpg
robby duta

in mobile apps our team use camera plugin for upload image to entity

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Robby,

If you use the camera plugin, you are not actually uploading a file, you are creating one, so I guess your original question is not actually what you want. I also assume the camera plugin delivers the image as a jpeg file, which makes the MIME type image/jpeg.

2024-03-25 06-19-08
Harlin Setiadarma

Hi Killian,

I'm using Upload widget from Accelerator (dragging binary column).


Unlike Upload Widget in Web Applications, Upload widget in mobile P10 does not return Filename and Type.


Below image for comparison (web apps):

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

I googled a bit, and it seems that file type checking is typically done server side, and difficult to do client side (see e.g. here).

2018-06-07 09-54-29
Renato Torres

Hi all,


The StackOverflow thread mentioned by Kilian has a solution that I have used on a mobile app with success:

  


Cheers,

Renato


Kilian Hekhuis wrote:

I googled a bit, and it seems that file type checking is typically done server side, and difficult to do client side (see e.g. here).



2025-11-03 12-56-18
Evert van der Zalm
 
MVP

You can take a look at this (mobile) component:

https://www.outsystems.com/forge/Component_Details.aspx?ProjectId=2078

Don't know for sure, but there can be some mime-type functionality in here.

Kind regard,
Evert

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.