• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Avatar

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not able to upload avatar file. File type is bmp,size 1KB and width and height are 48 x 48 pixels.

Is there any restriction for file types?

Thanks,
Gopal
[originally posted on jforum.net by gopal]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hhmm.. good question. Try using a jpg, gif or png file, and see if it works. If so, you can register this as a probably bug at http://www.jforum.net/jira

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

gopal wrote:I am not able to upload avatar file. File type is bmp,size 1KB and width and height are 48 x 48 pixels.



Why do you wanna upload a bmp? It can only be viewed by Windows-users.
[originally posted on jforum.net by lazee]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rafael,

I am able to upload jpg,gif or png files but not bmp. Better define default file types in configuration file like the other properties defined for avatar and aslo give an option for changing the avatar directory in configuration file like you did for upload directory.
Becuase we are planing to deploy forum application on few different machines with load blancer setup in front. In this case we want to use NFS directory to share some common directories(ie upload,avatar,etc..) accross all machines.
Right now i am able update the upload directory with NFS directory to access same files from different servers in the back ground. I have added servlet to display shared images for uploaded files but i didn't find an option to update avatar directory.

If my file type is in capital letters(ie JPG) then the image is not diplaying in the page. But it is working fine on your "Test Forum".
Do you have any idea what could be the issue?

lazee, Generally most of users using website doesn't know about these technical issues. If we have a file type property in configuration, then we can easly check the file type before uploading to server, If file type is not mentioned in the list then we can give message saying that it supports only these file types. I am suggesting rafael to add a property for file types in configuration file. So that we can update the file types for each different case (ie upload,avatar,etc..) depend on the requriment.

Just these are my thoughts.May be you guys have better ideas.

Thanks,
Gopal
[originally posted on jforum.net by gopal]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you please register an issue about this in Jira?

http://www.jforum.net/jira
[originally posted on jforum.net by lazee]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Posted a bug in jira.

We deployed the forum application on linux server does that cause the issue for capital file extention(.JPG)?

Gopal
[originally posted on jforum.net by gopal]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tracked the issue(.jpg vs .JPG) and fixed on my local build. May be you have already fixed this issue in your new versions because it is working fine on your "Test Forum".

Updated the shouldCreateThumb method on AttachmentCommon.java to work for both .jpg and .JPG file extension.

Following is the code that is checking with small file extension only in shouldCreateThumb method.

("jpg".equals(extension) || "jpeg".equals(extension) || "gif".equals(extension) || "png".equals(extension))

Hope this is the only one place that needs to be fixed. Let me know if there is any other file that needs to be updated.

Thanks,
Gopal
[originally posted on jforum.net by gopal]
 
I do some of my very best work in water. Like this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic