Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 2 Support (Qt 5) › how to ensure that a file is downloaded correctly using DownloadableResource ?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #23534

    jrrobles79

    I have being playing with the DownloadableResource, and have two issues, on Android

     

    The first is that some times the files aren’t being downloaded correctly, some pdf for example are downloaded incorrectly or damaged, some I don’t have problem, I can opened on the PDF Reader but with other files I got the message ‘Error, your document cant open because is damaged’, how ever if I download the same file in my computer or iphone or other app the files works, this is happening with pdfs, images, and other docs, my guess is that I need to configure some timeout, or maybe is the doc size or something? However on the onDownloadFinished(error) shows “No error”

     

     onDownloadFinished: {
    
                   switch(error){
    
                    case  DownloadableResource.NetworkError:
                         console.debug("DownloadableResource: Network error");
                        break;
    
                    case  DownloadableResource.UnauthorizedError:
                        console.debug("DownloadableResource: Unauthorized Error");
                        break;
                    case  DownloadableResource.FilePathError:
                        console.debug("DownloadableResource: file path Error");
                        break;
                    case  DownloadableResource.FileExtractionError:
                        console.debug("DownloadableResource: File Extraction Error");
                        break;
                     case  DownloadableResource.DownloadCancelledError:
                         console.debug("DownloadableResource: Downloa dCancelled Error");
                         break;
                     case DownloadableResource.UnknownError :
                         console.debug("DownloadableResource: UnknownError");
                         break;
    
                     case DownloadableResource.NoError:
                     default:
                         console.debug("DownloadableResource: No error")
                         break;
                   }

     

     

    My second  issue is, how can I remove the ‘_package’ subfolder  of the download path, I want to save the files on the ‘Downloads’ folder, is there a way to set the external media download folder? (I mean the SD card). It was very difficult to find where the documents were being saved, since the android have at least 2 downloads folders. I have already tried setting a default path on the property ‘DownloadableResource.storagePath’  but it is being ignored and set to a default storageLocation path

     

    #23537

    Alex
    Felgo Team

    Hi,

    could you provide a minimal example that reproduces this issue and send it to support@felgo.com ?

    Best,
    Alex

     

    #23538

    jrrobles79

    Hi Alex, is the same code on your documentation (https://felgo.com/doc/felgo-downloadableresource/#open-downloaded-files) , just tried different sources to download the same files, from dropbox,  google drive,  or AWS S3 folder. However Im considering that maybe is the android device or the apps to open the files, I don’t know , Im confused, but I will send my code to the email.

     

    Thank you

    #23539

    jrrobles79

    ==UPDATE==

    I belive that the problem is when you download from someplaces, for examples Droppbox I haven’t been able to download any file correctly but from aws s3 I have no problem

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded