• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

transferring multiple files but some cannot open

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi expert greenhorns:

I have a problem when i transfer files in different format, some files can open nicely, some cannot. For those cannot open normally, it shows some problems with content, that is why it cannot be opened. Thus i want to know how do i solve the problem. By the way, i actually do not have any problem to run the program in my server and client.
 
shen zhang
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello? anyone can help?
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does "transfer" mean? How are you doing that? Have after the transfer all files the same size as before? Are you taking care to transfer in binary mode, not ASCII, if applicable? TellTheDetails.
 
shen zhang
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:What does "transfer" mean? How are you doing that? Have after the transfer all files the same size as before? Are you taking care to transfer in binary mode, not ASCII, if applicable? TellTheDetails.


using server and client. my coding is running well, but sometimes I cannot open some files because they said the content has interrupted. Other thing I noticed that sometimes my first file size is less 1kb than the original one, then the next file is more 1 kb than original. where am I wrong? I will upload my code
 
shen zhang
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:What does "transfer" mean? How are you doing that? Have after the transfer all files the same size as before? Are you taking care to transfer in binary mode, not ASCII, if applicable? TellTheDetails.



server side


Client


if you run the code, you will reliezed that normally the first file is ok, then after some files cannot be open normally. Please let me know where am I wrong
 
Ulf Dittmer
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Other thing I noticed that sometimes my first file size is less 1kb than the original one, then the next file is more 1 kb than original.


That would explain the corrupted files. If you find a set of files for which that happens, use those as test cases to debug the code.
 
I carry this gun in case a vending machine doesn't give me my fritos. This gun and this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic