×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    77

    Thumbs up Unable to create file

    Hi,
    i have uploaded some files from the Image gallery to my server using http, when i upload files on server i also save the path of file on server so that when user want to restore the data from server he/she could be able to restore data at the same location from where he/she uploaded.

    code is working fine to download the data but when i try to create a file at the same location which i got from the server, i couldn't be able to create the file.

    for example i am uploading an image file from the image gallery from the path "E:\\Images\\200806\\200806A0\\02062008028.jpg"
    but when i try to create a file at the same path using the following code i couldn't create file.
    User::LeaveIfError(iFileSession.Connect());
    TInt err = iFileToDownload.Replace(iFileSession,_L("E:\\Images\\200806\\200806A0\\02062008028.jpg"),EFileWrite);
    if(err == KErrNone)
    {
    }
    else
    {
    }

    can any body guide me where i am doing wrong
    while the same code is working fine when i try to create the file at "C:\\02062008028.jpg" or "C:\\Abc\\02062008028.jpg".

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: Unable to create file

    You should check the error code (since you User::LeaveIfError, you can also make it visible via http://wiki.forum.nokia.com/index.ph...ded_panic_code). It can easily happen that you get KErrPathNotFound.

  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    77

    Re: Unable to create file

    its returning -28

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

  5. #5
    Regular Contributor
    Join Date
    May 2008
    Posts
    65

    Re: Unable to create file

    can u confirm all the path existed? if not, u must create the path before u write the file to that path!

Similar Threads

  1. Unable to read file error
    By gpalvia in forum Digital Rights Management & Content Downloading
    Replies: 0
    Last Post: 2007-11-21, 07:46
  2. Unable to read file DRM forward lock
    By gpalvia in forum Symbian
    Replies: 0
    Last Post: 2007-11-21, 03:58
  3. Replies: 10
    Last Post: 2007-07-02, 06:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×