Always getting filetype not allowed

Hi,

with the latest syncfusion version i always get filetype not allowed (screenshot). It happens only if i not specify save urls (which i do not want).

Best nils



Attachment: Screenshot_20200826_at_10.29.16.png_72bfa3f7.zip

3 Replies 1 reply marked as answer

SN Sevvandhi Nagulan Syncfusion Team August 27, 2020 01:37 PM UTC

Hi Nils, 


Greetings from Syncfusion support. 


We would like to inform you that in the 18.2.55 version with the code given the reported issue has not occurred. It accepts the file types that we provided in the AllowedExtensions property. Please find the sample below, 



With the provided information, we could not validate the issue. So kindly provide some more elaboration with following details help us to validate this issue further. 

1. Full code snippet of control rendering  
2. A simple sample which replicates the issue, if possible.  
3. Modify the provided sample to replicate the issue 


The above details would help us to analyze the issue and provide you the better solution. 


Regards, 
Sevvandhi N 


Marked as answer

BD Boot Dat January 3, 2023 07:03 AM UTC

I get file type not allowed when I upload a file from android phone which its extension is a jpg. but works well on iPhone which gives a jpeg. but jpg is part of my allowed extensions. 


Also it never shows anything when I decide to upload a one photo or I select two. it only shows and uploads when I select 3 or more photos.

<SfUploader ID="UploadFiles" AllowMultiple="true" AllowedExtensions=".jpeg, jpg, .png, .gif">
                 <UploaderEvents FileSelected="@FileSelectedHandler"></UploaderEvents>
                <UploaderAsyncSettings SaveUrl="api/FileUpload/Save" RemoveUrl="api/FileUpload/Remove"></UploaderAsyncSettings>
            </SfUploader>

private void FileSelectedHandler(SelectedEventArgs args)
    {
       addItem.ItemImage1 = args.FilesData[0].Name;
        addItem.ItemImage2 = args.FilesData[1].Name;
        addItem.ItemImage3 = args.FilesData[2].Name;
    }

The above is the only code I have for the file upload component in the razor file.





UD UdhayaKumar Duraisamy Syncfusion Team January 4, 2023 12:32 PM UTC

To upload jpg file, in AllowedExtensions you need to use .jpg instead of jpg.

<SfUploader ID="UploadFiles" AllowMultiple="true" AllowedExtensions=".jpeg, .jpg, .png, .gif">

    <UploaderEvents FileSelected="@FileSelectedHandler"></UploaderEvents>

    <UploaderAsyncSettings SaveUrl="api/FileUpload/Save" RemoveUrl="api/FileUpload/Remove"></UploaderAsyncSettings>

</SfUploader>


Loader.
Up arrow icon