Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Profile is larger than maximum size (MAX_FILE_SIZE)
11-11-2023, 13:25
Post: #1
Profile is larger than maximum size (MAX_FILE_SIZE)
Hi Simon,

I've just upgraded my OS and because I'm running it on a Pi it's easier just to install to a new SD card. Everything is fine, but on trying to import my MinimServer profile I'm met with the error message 'Selected file 'custom.profile' is larger than maximum size (MAX_FILE_SIZE)'. My profile is 2134 bytes.

I've got around it by loading it partially (removing some of the lines from the profile) and pasting the remainder back, but it's a bit of a pain. Is there any reason for such a restriction?
Find all posts by this user
Quote this message in a reply
11-11-2023, 18:35
Post: #2
RE: Profile is larger than maximum size (MAX_FILE_SIZE)
When you import a profile file, this file is loaded into memory by JavaScript code running in your web browser and sent to MinimServer as text in a form POST request. A size limit is needed in case the user accidentally selects a file with a size of several megabytes, which is likely to cause the browser and/or MinimServer to crash.

The current size limit is 2000 bytes. My largest profile is 1634 bytes so I haven't seen this error myself. I agree that a limit of 2000 bytes is too low for users with complex profiles, so I will increase this limit to 5000 bytes in the next update and change the error message to say what the limit is.
Find all posts by this user
Quote this message in a reply
11-11-2023, 19:03
Post: #3
RE: Profile is larger than maximum size (MAX_FILE_SIZE)
(11-11-2023 18:35)simoncn Wrote:  When you import a profile file, this file is loaded into memory by JavaScript code running in your web browser and sent to MinimServer as text in a form POST request. A size limit is needed in case the user accidentally selects a file with a size of several megabytes, which is likely to cause the browser and/or MinimServer to crash.

The current size limit is 2000 bytes. My largest profile is 1634 bytes so I haven't seen this error myself. I agree that a limit of 2000 bytes is too low for users with complex profiles, so I will increase this limit to 5000 bytes in the next update and change the error message to say what the limit is.

I hadn't considered how it's being sent.

The current size of my profile is mainly down to a few lengthy displayFomats including the comment tag that's building multple URLs, but I can't imagine ever reaching anywhere near 5000!

Thanks as always for the excellent support.
Find all posts by this user
Quote this message in a reply
13-11-2023, 21:22
Post: #4
RE: Profile is larger than maximum size (MAX_FILE_SIZE)
MinimServer update 245 (released today) supports importing a profile file with a length of up to 5000 bytes.
Find all posts by this user
Quote this message in a reply
14-11-2023, 13:01
Post: #5
RE: Profile is larger than maximum size (MAX_FILE_SIZE)
You have been busy!

Works great.
Thanks
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)