You need to sign in to do that
Don't have an account?

Profile image upload from visual force and it has to store rich text area field
Hi,
I want upload an image from visualforce page and it has to store in rich text area.
Here i tried it
<apex:page sidebar="false" showHeader="false" standardController="color__c" >
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"/>
<apex:stylesheet value="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css"/>
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"/>
<script>
$(function(){
$('#profile_image').change( function(e) {
var img = URL.createObjectURL(e.target.files[0]);
$('.image').attr('src', img);
});
});
</script>
<style>
.image{
width:120px;
height:120px
}
</style>
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection columns="1" >
<apex:image value="{!$Resource.icon}" styleClass="image"/>
<input type="file" id="profile_image" value=""></input>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Thanks if any one do this for me
I want upload an image from visualforce page and it has to store in rich text area.
Here i tried it
<apex:page sidebar="false" showHeader="false" standardController="color__c" >
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"/>
<apex:stylesheet value="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css"/>
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"/>
<script>
$(function(){
$('#profile_image').change( function(e) {
var img = URL.createObjectURL(e.target.files[0]);
$('.image').attr('src', img);
});
});
</script>
<style>
.image{
width:120px;
height:120px
}
</style>
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection columns="1" >
<apex:image value="{!$Resource.icon}" styleClass="image"/>
<input type="file" id="profile_image" value=""></input>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Thanks if any one do this for me