- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2018 05:23 PM
Hi All,
I have built a portal form using record producer to collect requests from internal customers. One of the issues we have is that the Portal doesn't display a progress bar when users upload files. You don't really know if the browser picked up your file until the upload is complete - files only appear on the page after 100%.
Does anyone know if there is a config setting to turn on the progress bar? Or do I need to write custom code for it?
Thanks,
Cathy
Solved! Go to Solution.
- Labels:
-
Customer Service Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2018 04:41 PM
Hello,
Suppose you are using OOTB Widget SC Catalog Item.
Seems like you wish an "spinner" or similar functionality that may indicate that the work of attaching the file is in progress.
Do not think you have any posibillities to get what you want from OOTB Widgets.
An option would be to build a separate widget for this, but as this may mean that you need to clone the Catalog Items widget, I do not recommend this being done, as this is a widget that is often modified in upcoming releases.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-26-2020 12:49 PM
For anyone stumbling upon this topic. It is possible to add progress bar to OOB attachment functionality very easy. Most of the logic to update the value of progress bar is already in nowAttachmentHandler angularjs directive.
If you wish to add it to e.g SC catalog item widget , find the line of code:
<now-attachments-list template="sp_attachment_single_line" ></now-attachments-list>
and after it add:
<div class="progress-wrapper">
<label for="file" class="progress-label" ></label>
<progress class="upload-progress" id="file" value="0" max="100"></progress>
</div>
The classes are the most important part becuase those are selected by jQuery inside nowAttachmentHandler.
You may also want to add class to hide progress-wrapper at start in CSS.
Additionally you may style it as you wish in CSS e.g:
.progress-wrapper{
display: none;
}
progress[value] {
/* Reset the default appearance */
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
/* Get rid of default border in Firefox. */
border: none;
}
progress[value]::-webkit-progress-bar {
background-color: #eee;
border-radius: 2px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) inset;
}
progress[value]::-webkit-progress-value {
background-image:
-webkit-linear-gradient(-45deg,
transparent 33%, rgba(0, 0, 0, .1) 33%,
rgba(0,0, 0, .1) 66%, transparent 66%),
-webkit-linear-gradient(top,
rgba(255, 255, 255, .25),
rgba(0, 0, 0, .25)),
-webkit-linear-gradient(left, #DFD139, #C83C36);
border-radius: 2px;
background-size: 35px 20px, 100% 100%, 100% 100%;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2020 10:21 PM
Michal,
This is a great solution. Where did you find the details regarding the nowAttachmentHandler angular directive?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2020 12:32 AM
Hi James,
I looked on community and found out some directives are only shown when accessing them directly with URL e.g <your instance>/scripts/angularjs-1.4/sn/common/attachments/factory.snAttachmentHandler.js
You can also find this code inside chrome debugger.
Then becuase I had to replicate whole attachment functionality on custom modal inside SP I went through whole code of attachment handler and connected functionalities and found out that there is already a part of code which handles progress bars :
function updateProgress(percent) {
if (self.prevPercent === percent && self.fileCount <= self.maxfiles)
return;
if (self.fileCount <= self.maxfiles) {
if (percent > 99)
self.fileCount++;
if (self.fileCount <= self.maxfiles) {
$timeout.cancel(self.errorTimeout);
self.errorTimeout = $timeout(broadcastError, 15000);
$('.progress-label').text('Uploading file ' + self.fileCount + ' of ' + self.maxfiles);
$('.upload-progress').val(percent);
$('.progress-wrapper').show();
}
}
self.prevPercent = percent;
}
Based on that I used simple HTML progress bar to handle above part of code from AttachmentHandler
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2022 11:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2022 01:48 PM
Hey Sri,
Were you following my instructions to get progress bar?