Uploading File with Umlaute (German) - solved

I am using the .csv to table package from Vikas. The uploaded file comes from one of
my customers. The customer is supposed to save an .xls file as .csv and upload it into
a collection. So far so good. Whenever there are Umlaute (ä, ö, ü), they are not translated
properly and the collection shows a character ¿ instead. So, a REPLACE would not work
there. Is there any experience on how to solve this problem? I have no chance to educate
my customer not to use Umlaute or to ask him to check the settings in their excel, since
they are numerous and anonymous.
Thanks,
Denes Kubicek
http://deneskubicek.blogspot.com/
http://htmldb.oracle.com/pls/otn/f?p=31517:1
-------------------------------------------------------------------

Okay,
With a little help from John Scott, I found a solution changing this part of the package to:
FOR i IN 1 .. l_record.COUNT
         LOOP
            htmldb_collection.update_member_attribute
                                     (p_collection_name      => p_collection_name,
                                      p_seq                  => l_seq_id,
                                      p_attr_number          => i,
                                      p_attr_value           => CONVERT
                                                                   (l_record
                                                                           (i),
                                                                    'UTF8',
                                                                    'WE8ISO8859P1'
         END LOOP;and it works properly for the German characters.
Thanks,
Denes Kubicek
http://deneskubicek.blogspot.com/
http://htmldb.oracle.com/pls/otn/f?p=31517:1
-------------------------------------------------------------------

Similar Messages

  • Impossible Upload files with Filezilla FTP Client after upgrade win8 to win8.1

    Hi
    Things were working fine with win 8 but, after Upgrade to win 8.1 is not possible upload files with Filezilla  FTP Client.
    is there anyone facing same problem?
    thanks in advance for any answer to help me solve this issue 
    Regards 
    TC

    Hi,
    Please Change your transfer settings in site manager from either default or passive to active it to see what's going on.
    Also, check IE compatibility mode.
    In addition, I suggest you install all latest updates for Windows since these updates will improve and fix some known issues.
    Kate Li
    TechNet Community Support

  • Logic to upload file with dynamic columns

    hi
    in my requirement i hav given to add logic to upload file with dynamic columns so that this upload program can be reused.
    this way the program is flexible, irrespective of the number of columns in the file.
    can any one explain this?
    and let me know what actually i hav to do.

    Check the program and the dynamic column is in the col_pos internal table and in the routines get_structure onwards.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/scm/dynamic%2bstructures%2band%2bcomponents
    cheers
    Aveek

  • Upload files with swedish characters NS 4.7

    Hi,
    I can upload files with swedish characters in the file name with IE 5, but not with Netscape 4.7. iFS presents an error message that the file doesn't exist or is empty.
    Is there a solution for this problem?
    /Elin
    null

    check out if you are using javascripts and whether IE supports it
    Roberto Nanamura <[email protected]> wrote:
    >
    Hi,
    I am having a problem uploading files with Internet Explorer, it works with
    Netscape Communicator. Has someone had the same problem?
    I am using WebLogic 5.1 service pack 5 with Netscape iPlanet 4.1 service pack 2
    in a Solaris 7.
    Best regards,
    Roberto N Nanamura
    Technical Consultant
    Summa Technologies

  • Upload files with international content

    I want to upload files with international content(many languages), from
    a single JSP. Any ideas?
    thanks,
    M.

    Hi Marco,
    I dont know transaction CV02N. But if this application uses standard function modules like GUI_UPLOAD it should work with ITS. A special configuration should not be required as long as the files have a size up to 5 MB. If they are larger it might be required to adjust the size of the request container MaxReqSize. Dont forget that Java has to be activated to let webgui access the filesystem.
    Regards,
    Klaus

  • How to associate an uploaded file with form data

    I have a "ticketing" app which stores a ticket no. as well as allows users to upload multiple files per ticket. The problem I am having is how to associate an uploaded file with a particular ticket no. As you can guess this becomes complicated when the same user can potentially update multiple tickets using the same file names. I am having difficulty trying to understand how to associate a ticket no with one or more uploaded files. I do have a custom table which I update with the attachments but I am unsure how to, or when to, update the ticket information on this custom table. I only want to retrieve attachments for a given ticket, not all attachments uploaded by a user.Does anyone have any ideas?

    Hi,
    My question is bit related to this topic.
    I am having a requirement to upload the CSV files so that they will store in a database table and later on wards when they search on that table it needs to pull the information and display on the form. I am a new bee to application express. Could some body tell me how to start this process with??. Just give me an overvoew/hints so that I will try to carry on my own.
    Cheers,
    Krishna.

  • Loading a CSV file with Umlaut characters (àáä)

    Hai,
    We are uploading a CSV file though a Custom JSP page built based on Oracle JTF framework.
    The JSP page is loading the data into FND_LOBS table using JTF object, oracle.apps.jtf.amv.ServletUploader.
    The CSV file in the FND_LOBS table stored properly with the umlaut characters.
    Now the JSP page invokes a Java object to read and parse the data. We are selecting the data first into BLOB object and then using the Input Stream Reader to get the data.
    Here is the sample code:
    oraclepreparedstatement = (OraclePreparedStatement)oracleconnection.prepareStatement(" SELECT FILE_DATA FROM FND_LOBS WHERE FILE_ID = :1 ");
    oraclepreparedstatement.defineColumnType(1, 2004);
    oraclepreparedstatement.setLong(1, <file id>);
    oracleresultset = (OracleResultSet)oraclepreparedstatement.executeQuery();
    blob = (BLOB)oracleresultset.getObject(1);
    InputStreamReader inputstreamreader = new InputStreamReader(blob.getBinaryStream());
    lineReader = new LineNumberReader(inputstreamreader )
    lCSVLine = lineReader.readLine();
    I tried printing the character set used by the InputStreamReader and it returned as ASCII
    Now I tried setting the different character sets to read Umlaut characters(german chars) but nothing has worked.
    InputStreamReader inputstreamreader = new InputStreamReader(blob.getBinaryStream(),"UTF-8");
    Can someone please let me know where and how to set the Character Set to accept the Umlaut characters like àáä?
    Thanks,
    Anji

    Thank you for the quick response.
    Requirement:
    I need to retrive the BLOB object with umlaut characters from database, parse the data with comma delimeter into strings and store in database.
    I am viewing the umlaut data from the database table using TOAD utility tool.
    I tried the same code example provided above but it is not working as expected. The umlaut characters are translated to 'ýýý.
    CODE EXAMPLE:
    Input:
    test_umlaut (sno NUMBER, col1 VARCHAR2(100), col3 BLOB);
    insert into test_umlaut(sno,col3) values(200, utl_raw.cast_to_raw('äöüÄÖÜ' ))
    Note: Verified that the database is showing the umlaut characters on selecting the col3 and storing in a flat file
    --- code
    OraclePreparedStatement oraclepreparedstatement10 = null;
    OracleResultSet rs = null;
    oraclepreparedstatement10 = (OraclePreparedStatement)oracleconnection.prepareStatement(" SELECT col3 FROM test_umlaut WHERE sno = 200 ");
    oraclepreparedstatement10.defineColumnType(1, 2004);
    rs = (OracleResultSet)oraclepreparedstatement10.executeQuery();
    while(rs.next()) {
    BLOB b = (BLOB)rs.getObject(1);
    InputStream is = b.getBinaryStream();
    InputStreamReader r = new InputStreamReader(is,"utf8");
    BufferedReader br = new BufferedReader(r);
    String line;
    while( (line = br.readLine()) != null) {
         System.out.println(line);
         OraclePreparedStatement oraclepreparedstatement12 = null;
         OracleResultSet oracleresultset12 = null;
         oraclepreparedstatement12 = (OraclePreparedStatement)oracleconnection.prepareStatement(" INSERT INTO test_umlaut(sno,col1) VALUES (300,?) ");
         oraclepreparedstatement12.setString(1,line);
         oraclepreparedstatement12.executeUpdate();
    br.close();
    r.close();
    is.close();
    Output: Verified the output from the database table which is inserted in the loop above.
    select col1 from test_umlaut where sno=300
    ýýý

  • Problem upload file with ftp

    Hi,
    I'd like to upload a file with an ftp. I declared a method using an url as follow :
    public static void uploadFile(File fileToMove_p, String newFileName_p) {
    try {
    URL url_l = new URL("ftp://[uid]:[pwd]@localhost/" + newFileName_p);
    URLConnection connection_l = url_l.openConnection();
    OutputStream output_l = connection_l.getOutputStream();
    BufferedOutputStream bos = new BufferedOutputStream(output_l);
    BufferedInputStream bis = new BufferedInputStream(new FileInputStream(fileToMove_p));
    int i;
    while ((i = bis.read()) != -1) {
    bos.write(i);
    catch (IOException ex) {}
    But when I oppen my new file, it miss the end of my data. The ftp cut the few last line of my original file.
    Any idear of what is happening here and how I can solve the problem ?
    Thanks

    Are you closing the OutputStream? If not, you probably should, and closing the stream will flush it prior to closing.
    HTH,
    &#167;

  • Problem in Uploading Files with Categories

    Hi All,
    We are working on uploading files to Content Database(CDB) after creating categories for all files to be uploaded individually. The code is working fine when we are using FdkConstants.ATTRIBUTE_TYPE_STRING for Attributes.ATTRIBUTE_TYPE while creating named-value pair for categoryAttributes. In this case all the files are uploading with category.
    But the problem we are facing is, when we use datatype other than STRING for FdkConstants like FdkConstants.ATTRIBUTE_TYPE_INTEGER, or FdkConstants.ATTRIBUTE_TYPE_BINARY…….. category sub class is not creating, and getting errors like
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: ORACLE.FDK.MetaDataError:ORACLE.FDK.MetadataOperationFailed
    faultActor:
    faultNode:
    faultDetail:
         {http://xmlns.oracle.com/content/ws}fault:<detailedErrorCode xsi:type="xsd:string">ORACLE.FDK.MetadataOperationFailed</detailedErrorCode><errorCode xsi:type="xsd:string">ORACLE.FDK.MetaDataError</errorCode><exceptionEntries xsi:type="ns1:ArrayOfFdkExceptionEntry" xsi:nil="true"/><info xsi:type="ns1:ArrayOfNamedValue" xsi:nil="true"/><serverStackTraceId xsi:type="xsd:string"/>
         {http://xml.apache.org/axis/}hostname:bluejays.appsassociates.com
    ORACLE.FDK.MetaDataError:ORACLE.FDK.MetadataOperationFailed
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
         at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
         at oracle.ifs.fdk.FdkException.getDeserializer(FdkException.java:270)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
         at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
         at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
         at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
         at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
         at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1276)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:324)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:291)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:207)
         at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:292)
         at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
         at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
         at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
         at org.apache.axis.client.Call.invoke(Call.java:2748)
         at org.apache.axis.client.Call.invoke(Call.java:2424)
         at org.apache.axis.client.Call.invoke(Call.java:2347)
         at org.apache.axis.client.Call.invoke(Call.java:1804)
         at oracle.ifs.fdk.CategoryManagerSoapBindingStub.createCategorySubClass(CategoryManagerSoapBindingStub.java:611)
         at oracle.ifs.fdk.client.impl.CategoryManagerProxy.createCategorySubClass(CategoryManagerProxy.java:100)
         at scheduleUpload.AarlmsUpload.createCategory(AarlmsUpload.java:851)
    Can anyone please solve our problem why this is happening? Please give solution as early as possible.
    Thanks in advance
    Eswari

    Hi Shashikumar,
    Can i have your mail id.
    I have some documents on bid process.
    Best Regards,
    Anil Rajpal

  • WEBUTIL: Uploading files with arabic file names to a BLOB column in DB

    Hi
    I'm using webutil (webutil_file_transfer.client_to_db_with_progress)
    to store files in a blob field in a 9i database, I'm doing that using forms 9i.
    I'm successful in storing files with English names in the database, however if I want to store a file with an arabic file name , it doesn't get uploaded and the BLOB is empty. Is there any work around to solve this problem.
    I tried renaming the arabic file name to an english file name then uploading which was fine, but when I try to rename the file back to arabic, this step fails. I asked a friend and he said that although I'm renaming the file back to arabic in a statment after uploading, that doesn't mean that the upload has finished, i.e the file is still locked for upload that's why I can't rename it back to arabic, I can't rename it even if I try that directly from the operating system.
    can anyone help in solving this problem!!
    Regards

    Hi
    I'm using webutil (webutil_file_transfer.client_to_db_with_progress)
    to store files in a blob field in a 9i database, I'm doing that using forms 9i.
    I'm successful in storing files with English names in the database, however if I want to store a file with an arabic file name , it doesn't get uploaded and the BLOB is empty. Is there any work around to solve this problem.
    I tried renaming the arabic file name to an english file name then uploading which was fine, but when I try to rename the file back to arabic, this step fails. I asked a friend and he said that although I'm renaming the file back to arabic in a statment after uploading, that doesn't mean that the upload has finished, i.e the file is still locked for upload that's why I can't rename it back to arabic, I can't rename it even if I try that directly from the operating system.
    can anyone help in solving this problem!!
    Regards

  • GP: Creation of process for uploading file with approval or a rejection

    Problem: It is necessary to organise process of uploading files in KM repository with approval or a rejection.
    I have created process with two callable objects.
    1. File Input
    2. Interactive Form/File Approval
    Has grouped structure "File"
    In Runtime, during object performance "Interactive Form/File Approval" there is an error:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: pdfSource of InteractiveForm UI element should be populated with pdf binary content in USE_PDF mode
    It is one problem, the second problem consists in that how to organise a folder choice where the file will be loaded.

    Hi Pustovoytov Stanislav ,
    Check whether if the context attribute pdfsource is of binary type or any other type. It sbould be of binary type.
    And about the second one you can organize the folder structure in the KM administration.
    Thanks
    Satya

  • Powershell: How do I upload files with metadata from a manifest file?

    I am using the script from this blog to try to upload files into SharePoint, using a manifest file to specify the metadata associated with each file. Right now, the script works, but is not populating
    the metadata from the manifest (xml) file. When I write the $metadataManifest variable out to the console, I get the contents of my xml file, so the code is reading the file when it should. However when it gets to the line in bold ($metadataManifest.Columns.Column),
    it does not go into that block...it just skips on to checkin the file. Again the $metadataManifest variable shows all the content in my xml manifest file. Here is what the script looks like...
    #Get web and document library objects
    $web = Get-SPWeb "http://companySite"
    $Library = "My Library"
    $docLibrary = $web.Lists[$Library]
    $ManifestFilePath = "C:\PowerShellScripts\Manifest.xml"
    $LocalPath = "C:\Upload\Test Upload\My Upload Directory\"
    if ($ManifestFilePath)
    $metadataManifest = (Get-Content ($ManifestFilePath))
    write-host "Manifest file: " $metadataManifest
    else
    write-host "Manifest file not specified for categorising uploaded documents"
    #Check for the LibraryStartFolder parameter to specify a root folder
    if ($PSBoundParameters.ContainsKey('LibraryStartFolder')) {
    $folder = $web.GetFolder($docLibrary.Title + $LibraryStartFolder)
    else
    $folder = $docLibrary.RootFolder
    #Attach to local folder and enumerate through all files
    if($IncludeSubFolders) {
    $files = Get-ChildItem $LocalPath -Recurse
    else
    $files = Get-ChildItem $LocalPath
    $files | ForEach-Object {
    #Check if the object is a folder - if so, create it in doc library
    if ($_.PSIsContainer) {
    if (($IncludeSubFolders) -and (!$FlattenStructure)) {
    #Generate folder path for creation in SharePoint
    #by looking at the parent folder on the local path
    $spFolderPath = ($_.Parent.FullName.Replace($LocalPath,"")).Replace("\","/")
    #Get the folder into which the new folder will be created
    #by adding the folder path generated above, if one existed
    if ($spFolderPath -eq "") {
    $currentFolder = $web.GetFolder($folder.Url)
    else
    $currentFolder = $web.GetFolder($folder.Url + $spFolderPath)
    #Check to see if subfolder already exists
    #and create it if not
    $testFolder = $currentFolder.SubFolders[$_.Name]
    if ($testFolder -eq $null) {
    write-host "`nAdding folder" $_.Name "to" $docLibrary.Title "in" $web.Title "..." -foregroundcolor Green
    $newFolder = $currentFolder.SubFolders.Add($_.Name)
    else
    write-host "`nFolder" $_.Name "already exists in" $docLibrary.Title "and shall not be created" -foregroundcolor Red
    else
    #Generate file path for upload into SharePoint
    if ($FlattenStructure) {
    $spFilePath = ("/" + $_.Name)
    else
    $spFilePath = ($_.FullName.Replace($LocalPath,"")).Replace("\","/")
    $spFullPath = $folder.Url + "/" + $spFilePath
    #Check if the file exists and the overwrite option is selected before adding the file
    if ((!$web.GetFile($spFullPath).Exists) -or ($Overwrite)) {
    #Add file
    write-host "`nCopying" $_.Name "to" $spFullPath.Replace("/" + $_.Name,"") "in" $web.Title "..." -foregroundcolor Green
    $spFile = $folder.Files.Add($spFullPath, $_.OpenRead(), $true)
    #$spFile = $folder.Files.Add($folder.Url + "/" + $file.Name, [System.IO.Stream]$fileStream, $true)
    $spItem = $spFile.Item
    #Walk through manifest XML file and configure column values on the file
    $metadataManifest.Columns.Column | ForEach-Object {
    #Single value text columns
    try
    if (($_.Type -eq "Text") -or
    ($_.Type -eq "Choice") -or
    ($_.Type -eq "Boolean") -or
    ($_.Type -eq "Number") -or
    ($_.Type -eq "Currency")) {
    $columnName = $_.Name
    write-host "Setting value on column"$columnName "..." -foregroundcolor Blue
    $_.Values.Value | ForEach-Object {
    $spItem[$columnName] = $_
    write-host "Value set to"$_
    catch {}
    #Multiple line text column
    try
    catch {}
    #Multiple choice columns
    try
    catch {}
    #Hyperlink columns
    try
    catch {}
    #Single User column
    try
    catch {}
    #Multiple User column
    try
    catch {}
    #Single value Managed Metadata column
    try
    catch {}
    #Multi value Managed Metadata column
    try
    catch {}
    #Update document with new column values
    $spItem.SystemUpdate($false)
    #Check in file to document library (if required)
    #MinorCheckIn=0, MajorCheckIn=1, OverwriteCheckIn=2
    if ($CheckIn) {
    if ($spFile.CheckOutStatus -ne "None") {
    $spFile.CheckIn("File copied from " + $filePath, 1)
    write-host $spfile.Name"checked in"
    #Approve file (if required)
    if ($Approve) {
    if ($spItem.ListItems.List.EnableModeration -eq $true) {
    $spFile.Approve("File automatically approved after copying from " + $filePath)
    if ($spItem["Approval Status"] -eq 0) { write-host $spfile.Name"approved" }
    else
    write-host "`nFile"$_.Name "already exists in" $spFullPath.Replace("/" + $_.Name,"") "and shall not be uploaded" -foregroundcolor Red
    $web.Dispose()
    And here is what the manifest file looks like...
    <?xml version="1.0" encoding="utf-8"?>
    <Columns>
    <Column Name="Column1" Type="Text">
    <Values>
    <Value>First File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>12585</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More Data</Value>
    </Values>
    </Column>
    </Columns>
    <Columns>
    <Column Name="Column1" Type="Text">
    <Values>
    <Value>Second File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>9876</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data2</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More more Data</Value>
    </Values>
    </Column>
    </Columns>
    I can't figure out what am doing wrong...why my script is not iterating through the manifest file to upload the document along with the metadata. I would really appreciate any help. Thanks

    Hi Spawn,
    Name should not be a problem.. I will probably post you the entire code (I modified it to meet your goals for having multiple column xml nodes as well)
    For the code snippet below:
    a. In powershell all my changes will have ## prefixed comments
    b. in XML I have changed one column name to "Name" to replicate your case and also added a parent node for making the xml well formed.
    and the SharePoint output
    Please see the code below
    $web = Get-SPWeb "http://intranet/sites/test"
    $Library = "My Library"
    $docLibrary = $web.Lists[$Library]
    $ManifestFilePath = "D:\Manifest.xml"
    $LocalPath = "D:\UploadPath\"
    if ($ManifestFilePath)
    ##read the xml file as an xml object
    [xml]$metadataManifest = (Get-Content ($ManifestFilePath))
    write-host "Manifest file: " $metadataManifest
    else
    write-host "Manifest file not specified for categorising uploaded documents"
    #Check for the LibraryStartFolder parameter to specify a root folder
    if ($PSBoundParameters.ContainsKey('LibraryStartFolder')) {
    $folder = $web.GetFolder($docLibrary.Title + $LibraryStartFolder)
    else
    $folder = $docLibrary.RootFolder
    #Attach to local folder and enumerate through all files
    if($IncludeSubFolders) {
    $files = Get-ChildItem $LocalPath -Recurse
    else
    $files = Get-ChildItem $LocalPath
    $counter=0
    $files | ForEach-Object {
    #Check if the object is a folder - if so, create it in doc library
    if ($_.PSIsContainer) {
    if (($IncludeSubFolders) -and (!$FlattenStructure)) {
    #Generate folder path for creation in SharePoint
    #by looking at the parent folder on the local path
    $spFolderPath = ($_.Parent.FullName.Replace($LocalPath,"")).Replace("\","/")
    #Get the folder into which the new folder will be created
    #by adding the folder path generated above, if one existed
    if ($spFolderPath -eq "") {
    $currentFolder = $web.GetFolder($folder.Url)
    else
    $currentFolder = $web.GetFolder($folder.Url + $spFolderPath)
    #Check to see if subfolder already exists
    #and create it if not
    $testFolder = $currentFolder.SubFolders[$_.Name]
    if ($testFolder -eq $null) {
    write-host "`nAdding folder" $_.Name "to" $docLibrary.Title "in" $web.Title "..." -foregroundcolor Green
    $newFolder = $currentFolder.SubFolders.Add($_.Name)
    else
    write-host "`nFolder" $_.Name "already exists in" $docLibrary.Title "and shall not be created" -foregroundcolor Red
    else
    #Generate file path for upload into SharePoint
    if ($FlattenStructure) {
    $spFilePath = ("/" + $_.Name)
    else
    $spFilePath = ($_.FullName.Replace($LocalPath,"")).Replace("\","/")
    $spFullPath = $folder.Url + "/" + $spFilePath
    #Check if the file exists and the overwrite option is selected before adding the file
    if ((!$web.GetFile($spFullPath).Exists) -or ($Overwrite)) {
    #Add file
    write-host "`nCopying" $_.Name "to" $spFullPath.Replace("/" + $_.Name,"") "in" $web.Title "..." -foregroundcolor Green
    $spFile = $folder.Files.Add($spFullPath, $_.OpenRead(), $true)
    #$spFile = $folder.Files.Add($folder.Url + "/" + $file.Name, [System.IO.Stream]$fileStream, $true)
    $spItem = $spFile.Item
    ## ensure we pick the corresponding node in the columns xml (first file, first xml node, second file - second node likewise)
    #Walk through manifest XML file and configure column values on the file
    $metadataManifest.FileData.Columns[$counter].Column | ForEach-Object {
    #Single value text columns
    try
    if (($_.Type -eq "Text") -or
    ($_.Type -eq "Choice") -or
    ($_.Type -eq "Boolean") -or
    ($_.Type -eq "Number") -or
    ($_.Type -eq "Currency")) {
    $columnName = $_.Name
    write-host "Setting value on column"$columnName "..." -foregroundcolor Blue
    $_.Values.Value | ForEach-Object {
    $spItem[$columnName] = $_
    write-host "Value set to"$_
    catch {}
    #Multiple line text column
    try
    catch {}
    #Multiple choice columns
    try
    catch {}
    #Hyperlink columns
    try
    catch {}
    #Single User column
    try
    catch {}
    #Multiple User column
    try
    catch {}
    #Single value Managed Metadata column
    try
    catch {}
    #Multi value Managed Metadata column
    try
    catch {}
    #Update document with new column values
    $spItem.SystemUpdate($false)
    ##increment the counter to read the next xml node
    $counter++
    #Check in file to document library (if required)
    #MinorCheckIn=0, MajorCheckIn=1, OverwriteCheckIn=2
    if ($CheckIn) {
    if ($spFile.CheckOutStatus -ne "None") {
    $spFile.CheckIn("File copied from " + $filePath, 1)
    write-host $spfile.Name"checked in"
    #Approve file (if required)
    if ($Approve) {
    if ($spItem.ListItems.List.EnableModeration -eq $true) {
    $spFile.Approve("File automatically approved after copying from " + $filePath)
    if ($spItem["Approval Status"] -eq 0) { write-host $spfile.Name"approved" }
    else
    write-host "`nFile"$_.Name "already exists in" $spFullPath.Replace("/" + $_.Name,"") "and shall not be uploaded" -foregroundcolor Red
    $web.Dispose()
    and the xml file
    <?xml version="1.0" encoding="utf-8"?>
    <FileData>
    <Columns>
    <Column Name="Name" Type="Text">
    <Values>
    <Value>First File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>12585</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More Data</Value>
    </Values>
    </Column>
    </Columns>
    <Columns>
    <Column Name="Name" Type="Text">
    <Values>
    <Value>Second File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>12585</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More Data</Value>
    </Values>
    </Column>
    </Columns>
    <Columns>
    <Column Name="Name" Type="Text">
    <Values>
    <Value>Third File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>12585</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More Data</Value>
    </Values>
    </Column>
    </Columns>
    <Columns>
    <Column Name="Name" Type="Text">
    <Values>
    <Value>Fourth File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>12585</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More Data</Value>
    </Values>
    </Column>
    </Columns>
    <Columns>
    <Column Name="Name" Type="Text">
    <Values>
    <Value>Fifth File</Value>
    </Values>
    </Column>
    <Column Name="Column2" Type="Text">
    <Values>
    <Value>12585</Value>
    </Values>
    </Column>
    <Column name="Column3" type="Text">
    <Values>
    <Value>Some Data</Value>
    </Values>
    </Column>
    <Column name="Column4" type="Text">
    <Values>
    <Value>More Data</Value>
    </Values>
    </Column>
    </Columns>
    </FileData>
    Thanks and Regards,
    Partha
    AvePoint

  • S3 backup can't upload files with apostrophe​s in the name

    s3 backup doesn't seem to be able to upload any file with an apostrophe in the name.  I see a load of "Unable to upload 'foo bar's.file' to Amazon S3" warnings in the event log.  The log is littered with file names that contain an apostrope.  This seems to be the thing that stands out in common with all of the failed transfers.  Is there some way to workaround the problem besides renaming all files containing apostropes?
    It seems like an easy fix to properly escape single quotes in the name for upload though, but I suppose that I'll need a firmware fix for a change like that.

     Hello spitzcor
    Have you checked your Amazon S3 account to see if the files have actually uploaded to the bucket or if they did indeed fail to upload?
    I also recommend that you contact support to have an incident created.  There is a hotfix for 4.1.108 that updates the Amazon S3 applications API version and might help with what you are experiencing, although it is intended for a seperate Amazon S3 issue.
    LenovoEMC Contact Information is region specific. Please select the correct link then access the Contact Us at the top right:
    US and Canada: https://lenovo-na-en.custhelp.com/
    Latin America and Mexico: https://lenovo-la-es.custhelp.com/
    EU: https://lenovo-eu-en.custhelp.com/
    India/Asia Pacific: https://lenovo-ap-en.custhelp.com/
    http://support.lenovoemc.com/

  • Problem in Upload files with Default Browser

    I love to use the default broswer to upload files to server due to its functionality. But today I came across something weird. I wanted to upload apk files to google play store, and when I click upload, the playbook file manager will open for me to select the file to upload, but the problem is the playbook file manager is limited to display some file formats like "apk, bar, mus, finale, tar, bz2 and bin".  I will like an update to fix this issue.
    Thanks.

    try by using System.err.println insted of System.out.println
    I'vs tried it with J2EE it works.

  • Couldn't Upload file with size more than 2K

    Hi,
    i am developing an webapplication where in i have to upload a file.we are using hibernate for data storing and retrieval.problem comes when i am uploading a file with size more than 2k bytes.if the file size lesser than 2k it works fine.i found that its a bug with thin jdbc driver version 9.but i am using 10g jdbc driver.still problem exists. i am not suppose to use oci drivers.
    working on
    OS: windows Xp.
    Apps :weblogic8.1
    DB: oracle 9i
    if anyone has solution plz mailme at [email protected]

    I'm not sure where the issue would be. Are you saying that you are using a 9i driver to access a 10g database? If so, download the newer driver and add it to your WEB-INF/lib directory. Remove the existing driver.
    If, on the other hand, you are using a 10g driver for a 9i database, I would not expect problems. However, you could always download the older driver and try it out.
    Or am I missing something?
    - Saish

Maybe you are looking for