Forums

Uploading a file greater than 100Mb to directory

I am trying to deploy a Keras CNN model file that is sized around 450MB. I am not able to upload the same to the Files Directory. Will I be able to upload file greater than 100MB if upgraded to Hacker account?

Thanks

See our help pages on this topic.

Your help page above states that the limit of 100MiB maximum size is related to uploading using the "Files" page -- (orange button) int he "browse files" page.

It is not clear if that limit is valid also for uploading by the own website in python (in flask for example: myfile = request.files.get('file') ..... myfile.save(mypath) )

Thanks

Yes, the limit applies to files uploaded via web app as well.

so will i be able to upload a file that is greater than 100 mb in paid version ???

Not via our website, but from a paid account you can use SFTP or scp to copy larger files up to PythonAnywhere.

Hi pythonanywhere, In my WebApp (www.presentarium.io) I would like the users to upload as large PDF files as they want. What is your advise on the simplest way to implement it? Can I use other disk space providers keeping the website at pythonanywhere? If I find no solution as soon as possible, I will have to migrate my website to another provider (e.g. back4app). Thanks for your advice!

I'm not sure I properly understand what you mean by using other disk space providers, though it sounds like something that might work -- could you give more details about what you mean by that?

I mean that the PDF files uploaded by users are stored not on your server but on another file hosting server, like Google drive or Dropbox or something else. Does it make sense?

You need to break the file into chunks and upload them. Luckily there's plenty of help with this. see - https://blog.teclado.com/file-uploads-with-flask/

Thank you sboyd! This seems the simplest way to go: the user provides a large file which is split into chunks under the hood, uploaded piece by pieces and finally merged. I will try this.

Glad we could help! And if that doesn't work, then yes, you could perhaps go down the Google Drive/Dropbox route.