Help with uploading a photo
I am trying to upload a photo to a web page it must be 1920X1920 pixels baseline standard JPEG fle size less than 1.8 mbsaved as RGB.
This is what I have done so far. Set the color profile first then set the size to 1920x1920 pixels then saved the file both to web and this makes the size too large when I save this file it saves as 3.0 mb. Can I change the size? the website requires the size to be less than 1.8 mb
Open your jpeg image in full edit.
Select the crop tool.
On the options bar select custom and enter your dimensions and choose 300 ppi.
Drag out the crop tool across your image and drag inside to move it to your best position.
Hit the check mark and choose Save As + sRGB
Your image will be the exact measurements and well within the maximum file size.
Click image to enlarge.
Similar Messages
-
Can anyone help with uploading photos from iPad to Facebook. Thanks
Can anyone help with uploading photos fom iPad to Facebook? Thanks
What app are you to trying to use ? You can't upload photos to Facebook via Safari, but a number of the Facebook apps support it e.g. the 'official' app : http://itunes.apple.com/us/app/facebook/id284882215?mt=8 (thought it's optimised for the iPhone/iPod Touch it does support uploading photos), Friendly For Facebook (http://itunes.apple.com/us/app/friendly-for-facebook/id400169658?mt=8)
-
Need help with cannon RAW photos
Please help- let my employee go and nearly 100 photos of my products were left on my hard drive, but I can not get them to open. They are somehow jacked up (show a different icon than they did). They have no previous version, and absolutely NOTHING I have tried to open them will work. Would someone be willing to test one to see if they can figgure it out? Or, has anyone fixed this problem before?
You are a genius! Now that I understand that those are support
files, and know what I am looking (at) and for- I found all the photos.
She left us in quite a mess- both with the photos and our web page so
thank you again for helping. Feel free to let me know if you need
anything in the future. I won't forget your help!
Cristi
910 10th Street, Greeley, CO 80631
P: 970-351-6398
F:
1-970-352-1085
[email protected]
facebook.com/AwardAlliance
www.awardalliance.com
Award Alliance is always doing cool
things on our facebook! Come like us, and maybe see your awards featured
there! (facebook.com/AwardAlliance)
On 2013-09-26 19:35, ssprengel
wrote:
RE: NEED HELP WITH CANNON RAW PHOTOS
created by
ssprengel in Photoshop Lightroom - View the full discussion -
Can Somebody help with uploading my iweb creation.
i have made a iweb site and upload it to my .mac.
later that day i deleted on my idisk the site manualy and i want to upload a news site but every time i tryed to upload the site iweb says that i need a .mac account. and that i have.
i have tryed with a other account (from a friend) and that worked. Strange but now it works. I tryed again with my account but still he ask that i need a .mac account.
Can anybody help me????i have solved it the solution was here
http://discussions.apple.com/thread.jspa?threadID=334447&tstart=45
many thanks -
Can I Get Help With This Perfect Photos Workflow?
I've switched over to Photos.
Set up iCloud photo library and seem to be forever uploading... After just over a week I'm still at 12k+ photos remaining to upload of around 18k total. At this rate I have over a month to wait for everything to complete!
The downside of this seems to be that photos taken on my iPhone - simply are not syncing to my Mac via the Photos App. The last iPhone photos are from April 8, since then I have taken around 40/50 more photos. On my phone they show as being uploaded, but nothing on my Mac.
On top of this issue, is it possible to cherry pick which albums etc I upload from my Mac to iCloud Photo Library?
Also, can I stop the upload of every single photo I have but still use iCloud to sync my iPhone photos back to my mac? The Photostream button is checked, but like I say photo syncing seems to have stopped in early April.
Finally, I have optimise storage checked on my iPhone for the photos that are being synced - yet each time I look at a photo is downloads the full res version. Is this the normal behaviour? I would have thought it simply created a smaller file size with a little less detail etc?! It's not really optimising storage if when I look at a synced album it then downloads every image...
Any help or guidance on how to set all this up correctly would be much appreciated!I have the exact same "issue." I have 8000 more photos to upload to iCloud. My iPhone, iPad, and iCloud (on the website) sync perfectly. However, nothing I take with my iPhone or iPad, after I switched to Photos, goes to my Mac. I'm guessing that once my entire library (previously iPhoto) goes up to iCloud, then it'll add those newer photos as well. I think uploading old photos has a priority over adding newer photos recently taken.
I did a test and tried to make a new, separate Photos library and used it as the System Photo Library but did NOT import all my old iPhoto items, and the Mac synced perfectly. So let's see what happens after the uploading of everything from our old iPhoto library.
Good luck! -
Help with Upload file to Server Examples
I have been working with the examples for how to upload a file to the server. Though i got the example to work. there is one more thing i need to do. i need to allow the user to be able to select multiple files. In the example when you click on Upload, it opens a MS window to allow you to select a file. This example does not allow you to select more then one file though. I found another example for selecting multiple files but this one differs very much in that the person who make it "Ryan Favro" created a whole new GUI window to select multiple files. those his example works great, i dont want a special window to select files, i want the MS window to do it.
Is there a way to make the original example that uses the MS window to allow the user to select multiple files ?
I have attached the example that uses the MS window.Hi,
Use this code. May be it helps u.
fileuploadapp.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:com="test.*" layout="absolute"
creationComplete="initApp()" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private const _strDomain:String = new String("http://localhost:8400/");
private const _strUploadScript:String = new String(_strDomain + "ProcessFileUp/UploadFile");
// Initalize
private function initApp():void {
Security.allowDomain(_strDomain);
]]>
</mx:Script>
<mx:Canvas width="400" height="300" horizontalCenter="0" verticalCenter="0">
<com:FileUpload
width="100%" height="100%"
uploadUrl="{_strUploadScript}"
uploadComplete="Alert.show('File(s) have been uploaded.', 'Upload successful')"
uploadIOError="Alert.show('IO Error in uploading file.', 'Error')"
uploadSecurityError="Alert.show('Security Error in uploading file.', 'Error')"/>
</mx:Canvas>
</mx:Application>
fileuoload.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:com="*"
layout="vertical" width="100%" minWidth="400" height="100%" minHeight="200"
title="Upload Files" creationComplete="initCom()">
<mx:Metadata>
[Event(name="uploadComplete", type="flash.events.Event")]
[Event(name="uploadProgress", type="flash.events.ProgressEvent")]
[Event(name="uploadCancel", type="flash.events.Event")]
[Event(name="uploadIOError", type="flash.events.IOErrorEvent")]
[Event(name="uploadSecurityError", type="flash.events.SecurityErrorEvent")]
</mx:Metadata>
<mx:Script>
<![CDATA[
import mx.controls.*;
import mx.managers.*;
import mx.events.*;
import flash.events.*;
import flash.net.*;
private var _strUploadUrl:String;
private var _refAddFiles:FileReferenceList;
private var _refUploadFile:FileReference;
private var _arrUploadFiles:Array;
private var _numCurrentUpload:Number = 0;
// Set uploadUrl
public function set uploadUrl(strUploadUrl:String):void {
_strUploadUrl = strUploadUrl;
// Initalize
private function initCom():void {
_arrUploadFiles = new Array();
enableUI();
uploadCheck();
// Called to add file(s) for upload
private function addFiles():void {
_refAddFiles = new FileReferenceList();
_refAddFiles.addEventListener(Event.SELECT, onSelectFile);
_refAddFiles.browse();
// Called when a file is selected
private function onSelectFile(event:Event):void {
var arrFoundList:Array = new Array();
// Get list of files from fileList, make list of files already on upload list
for (var i:Number = 0; i < _arrUploadFiles.length; i++) {
for (var j:Number = 0; j < _refAddFiles.fileList.length; j++) {
if (_arrUploadFiles[i].name == _refAddFiles.fileList[j].name) {
arrFoundList.push(_refAddFiles.fileList[j].name);
_refAddFiles.fileList.splice(j, 1);
j--;
if (_refAddFiles.fileList.length >= 1) {
for (var k:Number = 0; k < _refAddFiles.fileList.length; k++) {
_arrUploadFiles.push({
name:_refAddFiles.fileList[k].name,
size:formatFileSize(_refAddFiles.fileList[k].size),
file:_refAddFiles.fileList[k]});
listFiles.dataProvider = _arrUploadFiles;
listFiles.selectedIndex = _arrUploadFiles.length - 1;
if (arrFoundList.length >= 1) {
Alert.show("The file(s): \n\n• " + arrFoundList.join("\n• ") + "\n\n...are already on the upload list. Please change the filename(s) or pick a different file.", "File(s) already on list");
updateProgBar();
scrollFiles();
uploadCheck();
// Called to format number to file size
private function formatFileSize(numSize:Number):String {
var strReturn:String;
numSize = Number(numSize / 1000);
strReturn = String(numSize.toFixed(1) + " KB");
if (numSize > 1000) {
numSize = numSize / 1000;
strReturn = String(numSize.toFixed(1) + " MB");
if (numSize > 1000) {
numSize = numSize / 1000;
strReturn = String(numSize.toFixed(1) + " GB");
return strReturn;
// Called to remove selected file(s) for upload
private function removeFiles():void {
var arrSelected:Array = listFiles.selectedIndices;
if (arrSelected.length >= 1) {
for (var i:Number = 0; i < arrSelected.length; i++) {
_arrUploadFiles[Number(arrSelected[i])] = null;
for (var j:Number = 0; j < _arrUploadFiles.length; j++) {
if (_arrUploadFiles[j] == null) {
_arrUploadFiles.splice(j, 1);
j--;
listFiles.dataProvider = _arrUploadFiles;
listFiles.selectedIndex = 0;
updateProgBar();
scrollFiles();
uploadCheck();
// Called to check if there is at least one file to upload
private function uploadCheck():void {
if (_arrUploadFiles.length == 0) {
btnUpload.enabled = false;
listFiles.verticalScrollPolicy = "off";
} else {
btnUpload.enabled = true;
listFiles.verticalScrollPolicy = "on";
// Disable UI control
private function disableUI():void {
btnAdd.enabled = false;
btnRemove.enabled = false;
btnUpload.enabled = false;
btnCancel.enabled = true;
listFiles.enabled = false;
listFiles.verticalScrollPolicy = "off";
// Enable UI control
private function enableUI():void {
btnAdd.enabled = true;
btnRemove.enabled = true;
btnUpload.enabled = true;
btnCancel.enabled = false;
listFiles.enabled = true;
listFiles.verticalScrollPolicy = "on";
// Scroll listFiles to selected row
private function scrollFiles():void {
listFiles.verticalScrollPosition = listFiles.selectedIndex;
listFiles.validateNow();
// Called to upload file based on current upload number
private function startUpload():void {
if (_arrUploadFiles.length > 0) {
disableUI();
listFiles.selectedIndex = _numCurrentUpload;
scrollFiles();
// Variables to send along with upload
var sendVars:URLVariables = new URLVariables();
sendVars.action = "upload";
var request:URLRequest = new URLRequest();
request.data = sendVars;
request.url = _strUploadUrl;
request.method = URLRequestMethod.POST;
_refUploadFile = new FileReference();
_refUploadFile = listFiles.selectedItem.file;
_refUploadFile.addEventListener(ProgressEvent.PROGRESS, onUploadProgress);
_refUploadFile.addEventListener(Event.COMPLETE, onUploadComplete);
_refUploadFile.addEventListener(IOErrorEvent.IO_ERROR, onUploadIoError);
_refUploadFile.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onUploadSecurityError);
_refUploadFile.upload(request, "file", false);
// Cancel and clear eventlisteners on last upload
private function clearUpload():void {
_refUploadFile.removeEventListener(ProgressEvent.PROGRESS, onUploadProgress);
_refUploadFile.removeEventListener(Event.COMPLETE, onUploadComplete);
_refUploadFile.removeEventListener(IOErrorEvent.IO_ERROR, onUploadIoError);
_refUploadFile.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onUploadSecurityError);
_refUploadFile.cancel();
_numCurrentUpload = 0;
updateProgBar();
enableUI();
// Called on upload cancel
private function onUploadCanceled():void {
clearUpload();
dispatchEvent(new Event("uploadCancel"));
// Get upload progress
private function onUploadProgress(event:ProgressEvent):void {
var numPerc:Number = Math.round((event.bytesLoaded / event.bytesTotal) * 100);
updateProgBar(numPerc);
var evt:ProgressEvent = new ProgressEvent("uploadProgress", false, false, event.bytesLoaded, event.bytesTotal);
dispatchEvent(evt);
// Update progBar
private function updateProgBar(numPerc:Number = 0):void {
var strLabel:String = (_numCurrentUpload + 1) + "/" + _arrUploadFiles.length;
strLabel = (_numCurrentUpload + 1 <= _arrUploadFiles.length && numPerc > 0 && numPerc < 100) ? numPerc + "% - " + strLabel : strLabel;
strLabel = (_numCurrentUpload + 1 == _arrUploadFiles.length && numPerc == 100) ? "Upload Complete - " + strLabel : strLabel;
strLabel = (_arrUploadFiles.length == 0) ? "" : strLabel;
progBar.label = strLabel;
progBar.setProgress(numPerc, 100);
progBar.validateNow();
// Called on upload complete
private function onUploadComplete(event:Event):void {
_numCurrentUpload++;
if (_numCurrentUpload < _arrUploadFiles.length) {
startUpload();
} else {
enableUI();
clearUpload();
dispatchEvent(new Event("uploadComplete"));
// Called on upload io error
private function onUploadIoError(event:IOErrorEvent):void {
clearUpload();
var evt:IOErrorEvent = new IOErrorEvent("uploadIoError", false, false, event.text);
dispatchEvent(evt);
// Called on upload security error
private function onUploadSecurityError(event:SecurityErrorEvent):void {
clearUpload();
var evt:SecurityErrorEvent = new SecurityErrorEvent("uploadSecurityError", false, false, event.text);
dispatchEvent(evt);
// Change view state
private function changeView():void {
currentState = (currentState == "mini") ? "" : "mini";
]]>
</mx:Script>
<mx:states>
<mx:State name="mini">
<mx:SetProperty name="height" value="60"/>
<mx:SetProperty name="minHeight" value="60"/>
<mx:SetStyle target="{btnView}" name="icon" value="@Embed('assets/application_put.png')"/>
</mx:State>
</mx:states>
<mx:transitions>
<mx:Transition fromState="*" toState="*">
<mx:Resize target="{this}" duration="1000"/>
</mx:Transition>
</mx:transitions>
<mx:Canvas width="100%" height="100%">
<mx:DataGrid id="listFiles" left="0" top="0" bottom="0" right="0"
allowMultipleSelection="true" verticalScrollPolicy="on"
draggableColumns="false" resizableColumns="false" sortableColumns="false">
<mx:columns>
<mx:DataGridColumn headerText="File" dataField="name" wordWrap="true"/>
<mx:DataGridColumn headerText="Size" dataField="size" width="75" textAlign="right"/>
</mx:columns>
</mx:DataGrid>
</mx:Canvas>
<mx:ControlBar horizontalAlign="center" verticalAlign="middle">
<mx:Button id="btnAdd" toolTip="Add file(s)" click="addFiles()" icon="@Embed('assets/add.png')" width="26"/>
<mx:Button id="btnRemove" toolTip="Remove file(s)" click="removeFiles()" icon="@Embed('assets/delete.png')" width="26"/>
<mx:ProgressBar id="progBar" mode="manual" label="" labelPlacement="center" width="100%"/>
<mx:Button id="btnCancel" toolTip="Cancel upload" icon="@Embed('assets/cancel2.png')" width="26" click="onUploadCanceled()"/>
<mx:Button label="Upload" toolTip="Upload file(s)" id="btnUpload" click="startUpload()" icon="@Embed('assets/bullet_go.png')"/>
<mx:Button id="btnView" toolTip="Show/Hide file(s)" icon="@Embed('assets/application_get.png')" width="26" click="changeView()"/>
</mx:ControlBar>
</mx:Panel>
Regards,
Shivang -
Help with importing PC photo files and then organizing it all in iPhoto
Hi everyone,
I'm relatively new to mac but I am just loving my purchase! I need some serious help with getting all of my photos organized though so I can easily find it for editing in iMovie.
I've accumulated over 10,000 photos stored on my PC which I've since transferred over to my LaCie external drive for my MacBook Pro via a wireless network connecting my PC & Mac. Some of these I've put onto my laptop internal hard drive and those I've imported into the iPhoto library. However, do I need to move the rest of the photos from my LaCie drive into my internal hard drive to import the photos into iPhoto, or can I tell iPhoto to look for the files in the external drive. If so, how do I do that? I know I'll then have to create albums in order to sort them, which I know how to do. Is there any fast way to do it by date? I had it sorted into different file folders by month & year so I could easily find them on my PC and would like to do the same using albums.
I am quickly running out of hard drive space on my laptop which is why I've put most of my photos on the external drive. Once I organize my existing collection, I would like to be able to import new pictures and have it stored on my external drive, not my internal drive. How do I do that?
Any other tips on organizing a massive photo library would be greatly appreciated.
Thanks,
KarenKaren,
Is there any fast way to do it by date? I had it sorted into different file folders by month & year so I could easily find them on my PC and would like to do the same using albums.
This is where you get to enjoy the power of iPhoto's database. You can change the Sort in the View menu. Check out View > Sort Photos > by Date.
Or, click the little calendar icon near the lower left corner of the iPhoto window. This allows you to filter the library by year, month, week, or date. You can Command-click to add another date to your filter. You can Option-click to choose a recurring date: you get that month or date for all years in your library. [Want to see your kid's birthday for every year? Just Option-Click that date. Cool.]
The keywords filter is similar. There is a preference setting where you choose to filter based on ALL keywords chosen (where by choosing more keywords you narrow your field) or ANY keyword (where the more keywords you choose, the larger your field will be). Click on a keyword to filter your library by all photos containing that keyword. Use Command-click to add more keywords to the filter. A difference is that Option-click will eliminate photos with that keyword from your filter. [You can find all pictures of your kids with your dog but NOT at Halloween.]
You can create Smart Albums to combine the use of dates, keywords, ratings, titles, comments and more. The more information you enter into the database, the more powerful the tools become.
When your task of importing is complete and you are ready to play with iPhoto's features it may help to look at the iPhoto multimedia tutorial. Better organized than trying to read through the Help files, it can help you get acquainted with many of iPhoto's features.
Have fun. -
Need help with uploading web gallery
When I try to upload a gallery, I recieve the following error message: An error occured sending the file: a response was not received in time.
How do I correct this?Find the exported gallery on the hard drive, and open the index file in a web browser. If that works correctly, then yes, it's a problem that you'll need to discuss with your web host, rather than a Lightroom problem that we can help with, sorry.
-
Problems with uploading instructor photo to course manager
Does not work in Windows XP with Safari 5.1.7, can not upload instructor photo (300 x 300 or any other size). No errors, just does "Uploading Photo" and never completes.
Please advise.several things most of which have to do with what iPhoto is and how it works
iPhoto is a database program and you must not every make any changes to the contents or structure of the database (the files) except using iPhoto - never via the finder or other programs
as a database you never use the internal structure but use the database tools to access the photos
The only way to backup up the database is to copy it intact as a single entity to a different drive - you can not back it up in pieces
To backup the photos or move them to a different machine you export them from the database (file menu ==> export) and one of the options at that time is to assign new file names
when I drag them onto the hard drive to copy them I am of course getting the message pop up that says I already have a file of that name on the hard drive
So now that you understand how iPhoto works you see that there is a simple solution to this - simply export the photos and use the rename option in the export to assign sequential names to them
I went through all the photos and renamed them so they were all different
If you did this by typing a new title below the photo then you simply export using the use title as file name option
I have then tried right clicking the photo and going to "Show file", and have renamed the photo there
This is using the finder to modify the contents of the iPhoto library and will corrupt your library and make it unusable - to use it you will have to restore it as it was - your backup is the easiest
LN -
I need help with updating the items in the photo gallery. Anytime I transfer pictures from PC to the phone using either a USB connection or bluetooth, the items just stay in the memory card. What I mean is that they can only be acessed through file manager and not possible to veiw them using the Photo application. It is as if the Photo application does not automatically update itself. I have tried moving the items from one folder to another, even using the images folder itself. Please, can you tell me what to do about it?
Usually, the same thing happens with Videos too.
Thanks in advance.The apps wont recognise the photos or videos if file extension is missing.Go to file manager and locate your file.Check whether it contains file extension.If not rename the file with . Jpg extension.If you dont know the type of file, select options >details(it should be something like that) to know it.After renaming all your files in file manager close file manager and open yout photo app.It should show all your photos.Same goes for videos which you will need to rename to .mp4 or .3gp as the case may be.
In Love With My C6-01:Now running on Nokia Belle! -
Need help with uploading photos from PSE 12 to Revel
When I first logged into Revel from my new Photoshop 12 I selected the option to have me select which photos would be uploaded to Revel. That turned out to be a huge mistake. All I want to do is upload my current catelogue with the albums intact to Revel for Cloud protection. I have been working for two days to work around this and have had numerous problems. I can't get my albums to get uploaded without creating a new album in revel and then downloading from there. However, it appears that some albums have been authotmatically uploaded and I have thousands of pictures scattered, since most of them were scanned at different times and then organized into albums over the course of the past year. Can anyone help me with this. I was told that buying Adobe Photoshop 12 should make it very easy to put my photos in a cloud with the albums intact. PLEASE help.
Are you just trying to set up all of your elements albums as mobile albums?
You may find these documents helpful:
Elements Revel Troubleshooting
http://helpx.adobe.com/elements-organizer/kb/troubleshoot-revel-related-issues.html
Elements Organizer Reference:
http://helpx.adobe.com/pdf/elements-organizer_reference.pdf
Setting up your mobile albums in Elements:
http://tv.adobe.com/watch/learn-photoshop-elements-12/setting-up-your-mobile-albums/
https://helpx.adobe.com/elements-organizer/using/access-media-using-re vel.html -
Anyone help with uploading photos
I went to copy photos from an SD card inserted directly into the front of my PC and the pictures copied over to the ipod but I cannot see them under my photo list. They show up on my computer inside the ipod icon but not on the ipod itself can anyone help.
Welcome to Apple Discussions!
If you have synced with iTunes again, and the card was not inserted, it may have deleted the pics, as nothing was there (it looked for the card, and there were no photos.)
Try copying them to your computer's harddrive and sync from a folder there.
btabz -
Help with uploading photos to iPod from multiple computers
I uploaded photos from my computer at home quite easily. Then I plugged my iPod into my computer at work, went to the Photos tab in iTunes, and asked it to sync photos from My Photos on my computer. It proceeded to delete all the photos I had uploaded from home. How can I prevent it from deleting photos previously on the iPod?
Thanks.You can't load photos from multiple computers. There's no manual mode for photos, just different ways to sync. Syncing on a different computer will erase what's there. You can read a bit more here: iTunes and iPod: Frequently asked questions (FAQ) about Photo Sync
-
Help with buttons in photo gallery
Hello all
I am trying to find a more effeicent way to place buttons on each of my pages (Photo Gallery SIte). I have 150 pages and constantly have to link each button to the "next" or "last" button. Is there a more efficent way to for me to ad butons to each page.My site is Blazinginterest.com
Please give me some feedback on my site, possibly add a picture viewer?
Thank you, HDwhat code do you already have? Maybe we can help you modify
it where it's not working.
Also, how do you have it currently laid out? eg. do you have
several images on the screen, but some method to scroll through
other images? Have you done a search here or on director-online.com
(in the forum or articles section) on similar questions? Do you
have something written up to describe what features you need such
as a design document?
Just trying to get a sense of your level of programming in
general, experience with Director and what planning/details you
have worked out so far because there are so many different ways to
program a gallery. -
Help with uploading an excel file to a table using an application
Hello,
Can anyone please help me out with this issue. I have apex application where in the end users upload an excel file to a table. For this I have followed the solution provided in this link
http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
Using the above solution, I was able to upload the excel data to a table "sample_tbl1" successfully with fields Id,acct_no,owner_name,process_dt. But the thing is I want accomdate a particular condition while uploading the file data, to check see if the acct_no already exists in another table say "sample_tbl2" or not. If acct_nos already exists in sample_tbl2 then give out an error displaying the list of account numbers that already exists in the database. Below is the code which I am using to upload file data to a table.
DECLARE
v_blob_data BLOB;
v_blob_len NUMBER;
v_position NUMBER;
v_raw_chunk RAW(10000);
v_char CHAR(1);
c_chunk_len number := 1;
v_line VARCHAR2 (32767) := NULL;
v_data_array wwv_flow_global.vc_arr2;
v_rows number;
v_sr_no number := 1;
l_cnt BINARY_INTEGER := 0;
l_stepid NUMBER := 10;
BEGIN
--Read data from wwv_flow_files</span>
select blob_content into v_blob_data
from wwv_flow_files
where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER)
and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
v_blob_len := dbms_lob.getlength(v_blob_data);
v_position := 1;
/* Evaluate and skip first line of data
WHILE (v_position <= v_blob_len ) LOOP
v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
v_line := v_line || v_char;
v_position := v_position + c_chunk_len;
-- When a whole line is retrieved
IF v_char = CHR(10) THEN
-- Clear out
v_line := NULL;
EXIT;
END IF;
END LOOP;
-- Read and convert binary to char</span>
WHILE ( v_position <= v_blob_len ) LOOP
v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
v_line := v_line || v_char;
v_position := v_position + c_chunk_len;
-- When a whole line is retrieved </span>
IF v_char = CHR(10) THEN
-- Convert comma to : to use wwv_flow_utilities </span>
v_line := REPLACE (v_line, ',', ':');
-- Convert each column separated by : into array of data </span>
v_data_array := wwv_flow_utilities.string_to_table (v_line);
-- Insert data into target table
EXECUTE IMMEDIATE 'insert into sample_tbl1(ID,ACCT_NO,OWNER_NAME,PROCESS_DT)
values (:1,:2,:3,:4)'
USING
v_sr_no,
v_data_array(1),
v_data_array(2),
to_date(v_data_array(3),'MM/DD/YYYY');
-- Clear out
v_line := NULL;
v_sr_no := v_sr_no + 1;
l_cnt := l_cnt + SQL%ROWCOUNT;
END IF;
END LOOP;
delete from wwv_flow_files
where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER)
and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
l_stepid := 20;
IF l_cnt = 0 THEN
apex_application.g_print_success_message := apex_application.g_print_success_message || '<p><span style="font-size:14;font-weight:bold">Please select a file to upload.</span></p>' ;
ELSE
apex_application.g_print_success_message := apex_application.g_print_success_message || '<p><span style="font-size:14;font-weight:bold;color:green">File uploaded and processed ' || l_cnt || ' record(s) successfully.</span></p>';
END IF;
l_stepid := 30;
EXCEPTION WHEN OTHERS THEN
ROLLBACK;
apex_application.g_print_success_message := apex_application.g_print_success_message || '<p><span style="font-size:14;font-weight:bold;color:red">Failed to upload the file. '||REGEXP_REPLACE(SQLERRM,'[('')(<)(>)(,)(;)(:)(")('')]{1,}', '') ||'</span></p>';
END;
{code}
Can anyone please help me, how do i accomdate the condition within my existing code.
thanks,
OrtonOrton,
From your code it appears that the account No comes in the second column of the file = > v_data_array(1)
So You can put a conditional block around the execute immediate code that inserts the records
For instance
SELECT count(1) INTO ln_account_no_exists from <"sample_tbl2> where account_no = v_data_array(1);
IF ( ln_account_no_exists > 0 ) THEN
--Account No: already exists
<Do what you want to do here >
ELSE
EXECUTE IMMEDIATE ...
END IF:
{code}
Inorder to handle the account no records which exists you can
<li>Raise an exception
<li> Write record to table or insert into collection and then use a report region in the page based on this table/collection to show error records
<li> Append errored account No:s to the Success Message Variable programmatically(this variable is used by PLSQL process success/error message )
{code}
IF ( record exists)
apex_application.g_print_success_message := apex_application.g_print_success_message||','|| v_data_array(1) ; -- Comma separated list of errored account no:s
ELSE ...
{code}
Hope it helps
Maybe you are looking for
-
Error connecting to web analysis report from workspace
Hi, There are a number of web analysis reports. There is a link to one in a planning task list. However, when the report is opened an error appears saying Required application context analyzer is not available. Please contact your administrator The r
-
How to capture the value in buffer
Hi, In VA01, when I change name of ship to party. Want to compare changed with name in ztable. But when I change the name it will be in buffer.So how to do this? Is there any function module to caputure the value in buffer. Please suggest me. Regard
-
Image path sets ( servername) instead of \\servername
Due to a hardware meltdown I have had to rip the NW server out of the tree and install a new one. I have re-installed the server NW65sp8 and reinstalled ZENworks for Desktops 7 Now, When I set an imaging job on a workstation I browse to the server et
-
I just got my iPad 3 today, and it seem like the charger have some problem at first (but now okay, the charger is not charging my iPad 3 at first and I did a reboot, now all good.) Well my question is, when you turn off your iPad 3 while charging, is
-
T420s - screen brightness increases and decreases
Hi, I have noticed on my T420s that screen changes screen brightness depending on the picture on the screen. For example: - I look at some site with dark background and few grey letters when I switch screen to my outlook or for example firefox with t