Skip to content

Instantly share code, notes, and snippets.

View amrud's full-sized avatar
Working from home

Ismi Ammar amrud

Working from home
View GitHub Profile
amrud /
Created March 29, 2016 04:56 — forked from keirbowden/
Visualforce page that checks the size of a file selected for upload
<apex:page standardController="Account" extensions="AddAttachmentExt">
<apex:includeScript value=""/>
<apex:sectionHeader title="{!} Attachments" />
<apex:pageBlock mode="maindetail">
<apex:pageBlockSection title="Existing Attachments" columns="1">
<apex:PageBlockTable value="{!Account.Attachments}" var="attach">
<apex:column value="{!attach.Name}" />
<apex:column headerValue="Length (bytes)" value="{!attach.BodyLength}" />
<apex:column headerValue="Owner" value="{!attach.Owner.Name}" />
amrud / AddAttachmentExt.cls
Created March 29, 2016 04:56 — forked from keirbowden/AddAttachmentExt.cls
Extension controller to save an attachment associated with a record encapsulated in the standard controller
public with sharing class AddAttachmentExt
private ApexPages.StandardController stdCtrl;
public Attachment att {get; set;}
public AddAttachmentExt(ApexPages.StandardController inStd)
att=new Attachment();
amrud / designer.html
Created August 19, 2014 00:42
<link rel="import" href="../paper-ripple/paper-ripple.html">
<polymer-element name="my-element">
:host {
position: absolute;
width: 100%;
height: 100%;
amrud / designer.html
Created August 18, 2014 03:15
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<link rel="import" href="../google-map/google-map-directions.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../smoothie-chart/smoothie-chart.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-leaderboard.html">
<polymer-element name="my-element">