How to filter the file type and size when uploadind files into APEX

Hi,
I was wondering how I can do to validate the size of a file, before moving it to my table ? I'd like to filter the file type, but for this one, I think I can use regular expressions in a validation process.
I don't know if there is a way to read the file size even before sending it into the temporary file table.
Thank you
Leinad

Hello Leinad,
AFAIK, you have to create an APEX validation (PL/SQL returns Boolean or Returns error text), which will query the file details from apex_flow_files table. Here you can get filetype and size etc.
So just validate and if any validation fails, then delete the file from apex_flow_files and riase error message.
Regards,
Hari
P.S. Please note that, if there are other apex validations on your page and if they fail, still apex will load the file into apex_flow_files table. So it's good idea to create a validation (PL/SQL) which will fire (condition) when inline validation errors occured. Make sure that this is the LAST validation on your page in sequence. And here you can write code to delete the file from apex_flow_files table.
Edited by: Hari_639 on Sep 20, 2012 10:09 PM

Similar Messages

  • Saving multiple file types and sizes

    I design logos using Illustrator. After the design is approved I need to save it in multiple different file types and sizes. (ie. Jpg Hi, Med, Lo; tif; eps; pdf)
    Does anyone know of a script that can do this?
    Thanks,
    Mark

    I don't know of an existing script that does exactly this. You could make one though. Saving an Illustrator document to both 'eps' and 'pdf' formats is very straight forward once you know which options you want. Personally I would use Photoshop to create the required 'jpegs' Illustrator does not export to any given resolution only scaling at 72dpi… Open either the 'eps' or 'pdf' in Photoshop resize and save 3 times.

  • How to give the length , cardinality and format when creatin a data type?

    Hi,
    I am new to XI and i wish to know how to give the cardinality ,format and length when creating a data type .Also please let me know how to give the following?
    cardinality --repeating and required
                      non repeating , optional
    thanks and regards

    When you are defining the elements of the datatype there are columns where you can do what you need:
    <b>column type</b>: here you choose the type of data of the element
    it can be a standard type or a user defined one (if you click one time only it should appear an icon in the right for input help: click there and choose the type you need)
    <b>column occurence </b>: in a similar way of column type here you define the cardinality of the element (min occurence and max occurence)
    setting min occurrence: 1, max occurrence 1 or unbounded --> required
            mmin occurrence 0, max occurrence 0, 1 or unbounded --> optional
    about the attributes there are directly the choice between required or optional.
    <b> column details </b>: here you define the length of the  element if it is a string or a lot of other things if the type is a different one.
    I hope this will help you

  • As being a novice with my Mac Pro computer and Cannon 5D mark 3 camera my issue has arisen while over the last year and half, when down loading into my Photoshop Lightroom 4, my 18,000  photograph were not catalogued correctly, or hardly at all, so now ov

    As being a novice with my Mac Pro computer and Cannon 5D mark 3 camera my issue has arisen while over the last year and half, when down loading into my Photoshop Lightroom 4, my 18,000  photograph were not catalogued correctly, or hardly at all, so now over several months time my photos have apparently been redirected in my libraries and have begun not appearing in their allotted frames next to their number in the library they are in. they also have a small question mark (?) next to the photo space. The frames are blank but indicates that there is a photo there. The majority of photos are blank but about a tenth are seen . i apparently need to retrace where they went but do not know how to get that done . can someone help please?

    It would be difficult to tell you where to begin. If you moved photos around to different folders and didn't use Lightroom to move them, that would cause Lightroom to lose track of where they are. You have to remember that your images are not "in" Lightroom. Lightroom simply points to them wherever they are on your computer. All of the location information as well as the changes that you make to your images is stored in the catalog, which is a database. This catalog is central to the operation of Lightroom, and it's essential that you understand how it works and how to make it work for you. For all of those images that have "?" On them, or the folders that have the same, you will have to go through the process of locating them and showing Lightroom where they are located. With 18,000 images, and many of them missing, it might just be easier to start a new catalog and organize things properly from the beginning in that catalog.

  • Urgent : How to modify the line type and table type

    I am working on ALV Grid Control, i need to know how to modify the line type values to table type.
                 ls_celltab-fieldname = 'ZSAVINGS '.
                 ls_celltab-style = l_mode.
            INSERT ls_celltab INTO TABLE pt_celltab.
    Here ls_celltab is line type and pt_celltab is table type.
    Please give me the suggestion ASAP.
    C.Bharath Kumar

    Hi,
    Here is the example
    DATA: BEGIN OF LINE,
            LAND(3)  TYPE C,
            NAME(10) TYPE C,
            AGE      TYPE I,
            WEIGHT   TYPE P DECIMALS 2,
          END OF LINE.
    DATA ITAB LIKE SORTED TABLE OF LINE
              WITH NON-UNIQUE KEY LAND NAME AGE WEIGHT.
    LINE-LAND = 'G'.   LINE-NAME   = 'Hans'.
    LINE-AGE  = 20.    LINE-WEIGHT = '80.00'.
    INSERT LINE INTO TABLE ITAB.
    LINE-LAND = 'USA'. LINE-NAME   = 'Nancy'.
    LINE-AGE  = 35.    LINE-WEIGHT = '45.00'.
    INSERT LINE INTO TABLE ITAB.
    Regards
    Sudheer

  • File Type and Size for Video iPod

    I have the latest ipod that does it all, but I am a little concerned about the lack of control on the file type size. I can export a mp4 file with my own settings so it isn't such a large file but it won't load or play. I can convert the file but it makes it the standard file size which is larger than I want it to be. Isn't there a way to save my own settings and still have it play video?
    Thanks for any info from anyone.

    I want to save a higher and better compression and not such high quality settings as the ipod standards settings are.
    You can't.
    http://www.apple.com/quicktime/tutorials/creatingvideo.html
    Video formats supported:
    H.264 video up to 768 Kbps, 320 x 240, 30 frames per sec., Baseline Profile up to Level 1.3 with AAC-LC up to 160 Kbps, 48 KHz, stereo audio in .m4v, .mp4 and .mov file formats;
    MPEG-4 video up to 2.5 Mbps, 480 x 480, 30 frames per sec., Simple Profile with AAC-LC up to 160 Kbps, 48 KHz, stereo audio in .m4v, .mp4 and .mov file formats

  • Limit file type and size in Solution Manager

    Dear gurus,
    I'm writing an inquiry about the possibility of specifying file extension type and the size the user can upload to solution manager, for example in roadmap / configuration.
    I.e, we need to limit the user not to upload *.avi extension type, and limiting the size to 5MB.
    Thanks for help.
    Regards,

    Hi Bobby,
    Once you insert a file extension in table SADOCGENERIC,  after that, all documents with this file extension will be open and
    should be editable out-of-place with no edit restrictions. You'll just need to have a way to edit it in your computer.
    Kind regards, Fabricius

  • How to find the Installation Type and License Details.

    Hi,
    If we have an already installed oracle system on AIX ,how come we find whether the installation type is Standard or Enterprise ?,also where we can find the licensing details,ie number of user license?
    Regards,
    Sam

    Hello,
    Here is the difference:
    <<Enterprise Edition>>
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Feb 27 10:00:49 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    DBMS_STANDARD.DATABASE_NAME()
    ORCL
    << Standard Edition>>
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Feb 27 10:00:44 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Release 10.2.0.1.0 - Production
    DBMS_STANDARD.DATABASE_NAME()
    SRI
    -Sri

  • Will EC support setting default file type and Open With from file menu?

    The default file types I can live without, but at least allow for Open With on right click from Windows Explorer.
    I currently have EC set in the Open With programs list, but EC does not comply for any files I opt to open it with (.css, .php, .html etc).
    EC open but not the file I choose.
    Also, even though the above use case is not ideal when if I do attempt an Open With when EC is already open, a new application session starts instead of attempting to open in the currently active app frame. It would be ideal to allow for single app frame, multiple files when Open With is employed.
    Darrell

    Hey Darrell,
    Thanks for the feedback. How Edge Code treats files is definitely something we know isn't ideal and it's something we're looking at fixing soon. There's currently a story on the Brackets backlog that adresses the Open With issue - https://trello.com/c/GhF1Bgf9
    And it based on howit ranks in that priority it looks like we could potentially take that into Edge Code over the next couple of months.
    This is definitely a feature that we think is important before we consider ourselves 1.0 so it's high priority.
    =Ryan
    [email protected]

  • No file-type extensions appear when exporting files to a different format

    Hello.
    I have been having this issue for a while on both Pages and Numbers.
    Whenever I export a file to another format (e.g., pdf, txt, doc, or xls) the file appears WITHOUT any extension at all. I have to go to the file, click on the file name and type in the proper extension at the end of the filename.
    Frankly, I'm tired of doing this.
    Does anyone know of some way to fix this?
    Thanks for your help.

    Try to run Pages from an other user account.
    If it behaves flawlessly, we will know that the culprit is in your original user account.
    In such case, most of the time, the wrongdoer is the preferences file :
    <startupVolume>:Users:<yourAccount>:Library:Preferences:com.apple.iWork.Pages.pl ist
    Quit Pages,
    move the file on the Desktop
    restart Pages.
    If it behaves well, you will know the culprit. Move it to the trash and work … until the next corruption.
    Yvan KOENIG (VALLAURIS, France) mercredi 17 novembre 2010 16:47:56

  • How can I reset the font type and size on my email. It changed after I updated to Firefox 5.0 and I can't get it back.

    After updating to Firefox 5.0 the font changed on my email. I checked, and the default setting is what I had put in before the update but it's not working. How can I get my email to use the font and type size that I chose? The one that's currently being used (since after the update) is so tiny one can hardly see it. My email program is through yahoo but there doesn't seem to be a way to change it at the email site. I'm not terribly PC savvy so please respond with a detailed/explicit answer. Thanks for any help you can give me with this. I have Windows XP and use Firefox as my browser.

    Hi again...,,yes, I did try the "reset zoom" on the email compose message page and nothing happened. I'm not familiar with add-ons. Went to the address you suggested (DefaultFullZoomLevel) but don't know how to use it. Also, I don't want to enlarge the text on all web pages.....just the email page. By the way, if it makes a difference, I think I forgot to mention that I use AT&T/Yahoo webmail....not Outlook Express or Thunderbird or any other email program. I'm not familiar with those and don't want to change email programs. Thanks again for trying to help with this. I'm beginning to think this problem is "unfixable" and considering changing back to a previous edition of Firefox (IF that's even possible).

  • Best file type and size for logo?

    I should know this but I am going to ask anyway. I am have a local graphic artist create a new logo for me. It needs to be keyed in my show opening, segues, and close. The program is shot and edited in 720p but sometimes 1080p. The larger the better for scaling down? I am always lost when it come to this topic.
    Thanks in advance.
    Cheers.
    Tom

    As Russ said, it is better to scale down than up.
    Let me add this: if possible, the original file for the logo should use vectorial graphics. This way it won't have a fixed size, and can resized without any loss of quality. This should not be a problem if, for example, the logo is created in Illustrator (formats like eps, pdf, svg can contain vector data). Vector files are also usually smaller in size, although that is probably not a bi consideration here.
    Then you can make rasterized versions at different sizes, as needed. You'll probably use a png file in the video, as png supports alpha channel (transparency).

  • How to fill the tables faglflexa and faglflext when creating a new document

    Hello all,
    I need to modify the field faglflexa-RMVCT when creating a new FI document , actually i'm using the transaction ABUMN,
    i tried to use manu user-exit to change this table unfortunately , I have not changed this entry .
    Could you please help me to find a solution for this problem?
    Thank you in advance,

    When you are defining the elements of the datatype there are columns where you can do what you need:
    <b>column type</b>: here you choose the type of data of the element
    it can be a standard type or a user defined one (if you click one time only it should appear an icon in the right for input help: click there and choose the type you need)
    <b>column occurence </b>: in a similar way of column type here you define the cardinality of the element (min occurence and max occurence)
    setting min occurrence: 1, max occurrence 1 or unbounded --> required
            mmin occurrence 0, max occurrence 0, 1 or unbounded --> optional
    about the attributes there are directly the choice between required or optional.
    <b> column details </b>: here you define the length of the  element if it is a string or a lot of other things if the type is a different one.
    I hope this will help you

  • Dreamweaver setting wrong file type and creator codes

    First of all, I'm running Mac OS X 10.5.2 on an Intel-based
    Mac, with Dreamweaver CS3 9.0 build 3481.
    I have a site defined where I connect to my web server via
    FTP. On my server, I just upgraded my forum software to PHPBB 3.0,
    which created a new /forums/ directory. My plan is to use
    Dreamweaver to download that new /forums/ directory to my local
    site where I can edit the files. Inside the forums folder are
    several types of files, like ".php" files, ".htm" files, ".gif"
    files, etc.
    So, upon downloading the /forums/ folder to my local machine
    by dragging and dropping it (in Dreamweaver) from the remote site
    to the local site, I noticed that Dreamweaver insists on setting
    HFS file type and creator codes for files it recognizes, based on
    the filename extension.
    I've connected to the same server using the Finder and
    Transmit, and copied the remote /forums/ folder over to my local
    machine. Neither of those copies have files with file types and
    creator codes set, meaning they aren't actually set on the remote
    files and that this is indeed something Dreamweaver is doing on the
    fly as it downloads the files.
    I'm wondering if there's any way possible to disable this
    behavior, and just download the files like they are on the server?
    (File extension only). To make matters worse, on my Intel-based
    Mac, it's not even setting the proper codes, as you can see in the
    following image:
    http://homepage.mac.com/mdouma46/images/dreamweaver.png
    Notice for the ".php" document, it's attempting to set a file
    type of 'TEXT' and a creator code of 'DmWr' (DreamWeaver's creator
    code), but because the Dreamweaver developers didn't bother to take
    into account the byte-ordering differences between PowerPC Macs and
    Intel Macs, the codes are written in reverse: 'TEXT' becomes
    'TXET', and 'DmWr' becomes 'rWmD'. (If you're going to use
    low-level routines such as FSSetCatalogInfo() to set the file types
    and creator codes, you need to call CFSwapInt32HostToBig() on the
    OSType values before doing so, to make sure they're in Big-endian
    format).
    Anyone know where the conversion information is stored?
    Thanks in advance.....

    Creator codes are totally deprecated in snow leopard. as for a workaround you can use something like this.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    on open these_items
    repeat with this_item in these_items
    tell application "Finder"
    set the_file to POSIX path of (this_item as alias)
    tell application "System Events"
    set default application of file (the_file) to ("Main HD:Applications:Preview.app" as alias)
    end tell
    end tell
    end repeat
    end open</pre>
    save it as an application and drop files onto it to set them to open with Preview.

  • Webdynpro to limit MIME types and size

    Hi,
    I need to write an web dynpro application to limite the file type and size using IWDFileUpload API, does anyone has some suggestion ?
    Thanks a lot.
    Kind regards
    Ben.J.

    Hi Ben,
    I think you can restrict the file type and and also check the file size before uploading the file. You need to write the logic to check out the file type.
    Use the following code to check restrict the file upload of only txt file...
              IPrivateTestView.ITestElement pf =
                   wdContext.nodeTest().currentTestElement();
              IWDMessageManager mgr = wdComponentAPI.getMessageManager();
              if (pf.getFileResource().getResourceType().getFileExtension() != null
                   && pf
                        .getPatchResource()
                        .getResourceType()
                        .getFileExtension()
                        .equalsIgnoreCase(
                        "txt")) {
    // Check if file size is in valid range.. call getFileSize()
    mgr.reportSuccess("File can be uploaded");
              } else {
                   mgr.reportException("Kindly upload ont TXT files", false);
    And use following code for calculating File Size:
         private String getFileSize(IWDResource resource) {
              InputStream stream = null;
              DecimalFormat myFormatter = new DecimalFormat("###.##");
              double size = 0;
              String unit = "";
              try {
                   stream = resource.read(false);
                   size = stream.available();
                   if (size < 1024) {
                        unit = " Bytes";
                   } else if (size < 1048576) {
                        size = size / 1024;
                        unit = " KB";
                   } else if (size < 1073741824) {
                        size = size / 1024 / 1024;
                        unit = " MB";
              } catch (IOException e) {
                   wdComponentAPI.getMessageManager().reportException(
                        e.getLocalizedMessage(),
                        true);
              } finally {
                   if (stream != null) {
                        try {
                             stream.close();
                        } catch (IOException e) {
                             wdComponentAPI.getMessageManager().reportException(
                                  e.getLocalizedMessage(),
                                  true);
              return myFormatter.format(size) + unit;
              //@@end
    This way you can restrict the users. As far as I know there is no standard way of restricting the same
    Hope it helps
    Regards
    Abhinav

Maybe you are looking for

  • 10.6.8 Broken Digital Audio Out

    After update from 10.6.7, digital sound worked. However, software such as EyeTV began capturing the digital audio port and keeping it. Quitting EyeTV would not release the audio to other programs. Other programs then routed sound to the internal spea

  • GLXUnsupportedPrivateRequest error when starting gridwars

    Hi, I'm running arch64 and I just installed gridwars from AUR, but when I start it up it gives me a black screen, then crashes. When I ran it in the terminal I got this output [ronn@celestial ~]$ gridwars X Error of failed request: GLXUnsupportedPriv

  • Redarding receiver determination

    hi all iam ajay, here i faced a problem at xi server. even i created the receiver determination it alerts an error in receiver determination.i furnished my error below. let me know the solution <SAP:Category>XIServer</SAP:Category>   <SAP:Code area="

  • Manuals management add-on

    Hi all, I'd like to know if some B1 add-on, was created to manage Technical Manuals i.e. revisioning, authorig etc. Regards, Mauro

  • How 2 find ORAOPS10.dll in a 64 bit version

    We have a .net application developed on 32 bit using odp.net to communicated with our database. When we deploy the application on a 64 bit server with a Oracle 10 Client Installed we get an: unable to load dll 'oraops10.dll'. We tried copying the fil