Attached file in assignment does not download in Mobiles

Attached file in assignment does not download in Mobiles

by Mahtab Hussain -
Number of replies: 11

May you live in peace!

The question might already have been answered but I could not find one. Therefore, I am starting new thread in hope to get a solution.

We are running Moodle 2.4 and have enable mobile theme and web services. The site is accessible through mobile devices fine.

We have courses with assignments. Within description of each assignment, we have linked a source file to students. When someone clicks file link on a PC, it downloads the file fine.

BUT

When someone tries to open that file in mobile devices (ipad, iphone, android), it does not download the file, rather a text appears saying

'undefined'

 

Can anyone please help to resolve this issue?

Warm regards,

Average of ratings: -
In reply to Mahtab Hussain

Re: Attached file in assignment does not download in Mobiles

by Ian Simpson -

Hello; as I understand it, the phone (mobile device) does download the file..... but does not open that file.

The answer is highly likely to be that the device does not have an appropriate program with which to open the file.

Technically, the device does not recognise the MIME type of the file downloaded.

Try -as an experiment- downloading a '.txt ' file to your phone. That may  be read - I stress 'may'.

 

In reply to Ian Simpson

Re: Attached file in assignment does not download in Mobiles

by Mahtab Hussain -

May you live in peace Ian!

Thanks a lot for your reply and pointers. I followed the instructions and created a link to text file. When I tried to download it on my mobile device, it produced the same result.

Then, I edited the link and put mime type under 'Advanced' tab while editing the link. Tried again but got the same result.

As a final measure, I turned debugging on to Developer level but did not get any error message even.

Any other pointers????

Warm regards,

Mahtab Hussain

In reply to Mahtab Hussain

Re: Attached file in assignment does not download in Mobiles

by Ian Simpson -

Hi, I suspect that the file isn't opening because the file type isn't recognised.

I know that FireFox and Dolphin browsers will recognise pdfs. Install one (or both) on your phone(s) and see if that helps.....

Good luck

Ian

In reply to Ian Simpson

Re: Attached file in assignment does not download in Mobiles

by Mahtab Hussain -

May you live in peace Ian!

Thanks once again for pointers. I downloaded firefox browser on my HTC sensation 4G (Android 4.1) and tried again but got the same error.

Still thanks a lot for your effort.

Looking to hear further about this issue....

Warm regards,

Mahtab Hussain

In reply to Mahtab Hussain

Re: Attached file in assignment does not download in Mobiles

by Ian Simpson -

Hi Mahtab,

Is the url of the resource private? If it isn't, send it to me and I'll see if I can download it.... SamsungS3 running FF and Dolphin (among others)

Ian

toiansimpson[AT]gmail.com

In reply to Ian Simpson

Re: Attached file in assignment does not download in Mobiles

by Mahtab Hussain -

May you live in peace Ian!

To let you test, Please access it here:

http://fitdev.paktaleem.net

username: test

password: test1234

There is a test course with an assignment activity. The activity has a download link to let you test the issue.

Warm regards,

Mahtab Hussain

In reply to Mahtab Hussain

Re: Attached file in assignment does not download in Mobiles

by Ian Simpson -

Hi,

Tested both in Dolphin and FF.

Both undefined.

Hmmmmm.

This issue has got me interested. I'll try a similar exercise on our server and see what happens.

Regards,

Ian

In reply to Ian Simpson

Re: Attached file in assignment does not download in Mobiles

by Mahtab Hussain -

Thanks Ian,

Waiting for your update.

In reply to Mahtab Hussain

Re: Attached file in assignment does not download in Mobiles

by Mahtab Hussain -

May you live in peace Ian!

I have just found that If you refresh/reload the page which says 'undefined', you get the file.  Please check and update.

But, I could not figure out why this behavior?

Regards,

Mahtab Hussain

In reply to Mahtab Hussain

Re: Attached file in assignment does not download in Mobiles

by Mahtab Hussain -

May you live in peace Ian!Thanks for your assistance. I finally got it resolved. For anyone, who may encounter similar issue, I simply got it right by 'Purging all Caches' in Moodle.

Cheers,

Mahtab Hussain

Average of ratings: Useful (1)
In reply to Mahtab Hussain

Re: Attached file in assignment does not download in Mobiles

by Kai Yang Lim -

Purge cache doesn't work for me (Moodle 2.5.4+)

The downloaded file seems not recognized by the OS.

For example in Android, the PDF file has its unique icon. But when I browse to open download folder via default "Downloads" app, the PDF is with an blank icon.

Summary of problem:

iOS - "undefined" word shown. Refresh safari on same URL helps.

Android - File is downloaded but a toast message says "Can't open file".