Error in creating and copying selected filesHow do I check whether a file exists without exceptions?How do I copy a file in Python?What is the difference between a deep copy and a shallow copy?How do I create a Java string from the contents of a file?Undo working copy modifications of one file in Git?How do I include a JavaScript file in another JavaScript file?How to clone or copy a list?How to read a file line-by-line into a list?How to copy a folder from remote to local using scp?What is the difference between the `COPY` and `ADD` commands in a Dockerfile?

What does the vector to raster option in QGIS do, exactly?

Longest Text in Latin

Tikzpicture in figure problem

return tuple of uncopyable objects

How to cope with regret and shame about not fully utilizing opportunities during PhD?

Entering the UK as a British citizen who is a Canadian permanent resident

Why was Endgame Thanos so different than Infinity War Thanos?

What are the implications of the new alleged key recovery attack preprint on SIMON?

Area under the curve - Integrals (Antiderivatives)

Loading Latex packages into Mathematica

Extracting sublists that contain similar elements

Where to find every-day healthy food near Heathrow Airport?

Why was Thor doubtful about his worthiness to Mjolnir?

What are the holes in files created with fallocate?

What information do scammers need to withdraw money from an account?

Frame adjustment for engine

Anabelian geometry ~ higher category theory

Why does the headset man not get on the tractor?

What's the difference between "за ... от" and "в ... от"?

What are the components of a legend (in the sense of a tale, not a figure legend)?

Automatically anti-predictably assemble an alliterative aria

Why does my circuit work on a breadboard, but not on a perfboard? I am new to soldering

What to do if SUS scores contradict qualitative feedback?

Anatomically Correct Carnivorous Tree



Error in creating and copying selected files


How do I check whether a file exists without exceptions?How do I copy a file in Python?What is the difference between a deep copy and a shallow copy?How do I create a Java string from the contents of a file?Undo working copy modifications of one file in Git?How do I include a JavaScript file in another JavaScript file?How to clone or copy a list?How to read a file line-by-line into a list?How to copy a folder from remote to local using scp?What is the difference between the `COPY` and `ADD` commands in a Dockerfile?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have written a code that is supposed to copy file selected from Storage Access Framework and paste them in my app's private directory. But some files can not be created and copied.



How the code runs



The copy/paste and file creation work is handled by a background thread that I have created.



  1. Runnable class is fed with the clip(ClipData) received from SAF


  2. Thread is start()


  3. A for loop inside the Runnable class moves through clip using indexes


  4. On first iteration, file type is determined and sent to createPrivateFile() function.


  5. Function spits out a file of specified extension and pickedFile variable is set to it.


  6. openOutputStream() opens stream with the created file URI


  7. openInputStream() is fed with clip's URI.


  8. Bytes from inputStream is fed to the file using byteArray.


Unfortunately, in my case I do not have much options to opt for. I have searched for the problem for 2 days with no success.



class AttachmentReceiverRunnable internal constructor(private val clip: ClipData, context: Context) : Runnable 

private val weakContextReference = WeakReference(context)
private var progressUpdater: ProgressBarResultPublisher? = context as ProgressBarResultPublisher


override fun run()

Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND)

val context = weakContextReference.get()
val actualProgress: Int = 100 / clip.itemCount
var clipSize = clip.itemCount
val clipCount = (clip.itemCount) - 1
var lastProgress = 0
val contentResolver: ContentResolver = context!!.contentResolver


for (item: Int in 0 until clipCount)

val clipItem = clip.getItemAt(item)
val fileType = contentResolver.getType(clipItem.uri)
val extension = fileType!!.substringAfter("/")
Log.d("FILE TYPE", extension)


val pickedFile = createPrivateFile(extension)


if(pickedFile.createNewFile())
Log.d("FILE CREATION","SUCCESFUL")
else
Log.d("FILE CREATION"," NOT SUCCESFUL")


val fileContentURI = FileProvider.getUriForFile(context, "com.minutecodes.openote.fileprovider", pickedFile)

val out = contentResolver.openOutputStream(fileContentURI)
val inStream = contentResolver.openInputStream(clipItem!!.uri)


val byteArray: ByteArray = inStream!!.readBytes()
pickedFile.writeBytes(byteArray)


lastProgress += actualProgress
progressUpdater!!.onProgressUpdate(lastProgress, clipSize)
clipSize -= 1

out!!.flush()
out.close()
inStream.close()


return





@SuppressLint("SimpleDateFormat")
@Throws(IOException::class)
private fun createPrivateFile(fileExtension: String): File

val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss").format(System.currentTimeMillis())
@Suppress("JoinDeclarationAndAssignment") val storageDir: File?
val newFile: File?
var extension: String = fileExtension


if (fileExtension == "plain")
extension = "txt"

storageDir = weakContextReference.get()!!.getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS)
if (!storageDir!!.exists())
storageDir.mkdirs()

newFile = File(storageDir,"FILE_$timeStamp.$extension")

return newFile





Expected Result: If 6 files are picked, six files should be created and fed with byteArray.



Actual Result: If 6 files are picked, it created often 3 files so only 3 selected files are copied. If 20 files are picked, about 11-13 files are copied.



Unfortunately, consistency is not always attained and random number of selected files are copied.



As far as I have tested, the problem lies within file creation not file copying.



Logcat



2019-03-23 18:14:53.932 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 0
2019-03-23 18:14:53.951 19579-19666/com.minutecodes.openote D/FILE TYPE: jpeg
2019-03-23 18:14:53.963 19579-19666/com.minutecodes.openote D/FILE CREATION: SUCCESFUL
2019-03-23 18:14:54.001 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 1
2019-03-23 18:14:54.009 19579-19666/com.minutecodes.openote D/FILE TYPE: aac
2019-03-23 18:14:54.016 19579-19666/com.minutecodes.openote D/FILE CREATION: SUCCESFUL
2019-03-23 18:14:54.133 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 2
2019-03-23 18:14:54.137 19579-19666/com.minutecodes.openote D/FILE TYPE: aac
2019-03-23 18:14:54.142 19579-19666/com.minutecodes.openote D/FILE CREATION: NOT SUCCESFUL
2019-03-23 18:14:54.195 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 3
2019-03-23 18:14:54.197 19579-19666/com.minutecodes.openote D/FILE TYPE: mpeg
2019-03-23 18:14:54.201 19579-19666/com.minutecodes.openote D/FILE CREATION: SUCCESFUL
2019-03-23 18:14:54.251 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 4
2019-03-23 18:14:54.257 19579-19666/com.minutecodes.openote D/FILE TYPE: aac
2019-03-23 18:14:54.263 19579-19666/com.minutecodes.openote D/FILE CREATION: NOT SUCCESFUL


The following Logcat was captured when 6 items were selected. As you can see, sometimes file creation is not successful, and hence I'm not able to copy files.










share|improve this question
























  • Try to add a small delay in between the creations of files to see if the succes ratio increases and to pin down the exact problem.

    – MwBakker
    Mar 23 at 16:20

















0















I have written a code that is supposed to copy file selected from Storage Access Framework and paste them in my app's private directory. But some files can not be created and copied.



How the code runs



The copy/paste and file creation work is handled by a background thread that I have created.



  1. Runnable class is fed with the clip(ClipData) received from SAF


  2. Thread is start()


  3. A for loop inside the Runnable class moves through clip using indexes


  4. On first iteration, file type is determined and sent to createPrivateFile() function.


  5. Function spits out a file of specified extension and pickedFile variable is set to it.


  6. openOutputStream() opens stream with the created file URI


  7. openInputStream() is fed with clip's URI.


  8. Bytes from inputStream is fed to the file using byteArray.


Unfortunately, in my case I do not have much options to opt for. I have searched for the problem for 2 days with no success.



class AttachmentReceiverRunnable internal constructor(private val clip: ClipData, context: Context) : Runnable 

private val weakContextReference = WeakReference(context)
private var progressUpdater: ProgressBarResultPublisher? = context as ProgressBarResultPublisher


override fun run()

Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND)

val context = weakContextReference.get()
val actualProgress: Int = 100 / clip.itemCount
var clipSize = clip.itemCount
val clipCount = (clip.itemCount) - 1
var lastProgress = 0
val contentResolver: ContentResolver = context!!.contentResolver


for (item: Int in 0 until clipCount)

val clipItem = clip.getItemAt(item)
val fileType = contentResolver.getType(clipItem.uri)
val extension = fileType!!.substringAfter("/")
Log.d("FILE TYPE", extension)


val pickedFile = createPrivateFile(extension)


if(pickedFile.createNewFile())
Log.d("FILE CREATION","SUCCESFUL")
else
Log.d("FILE CREATION"," NOT SUCCESFUL")


val fileContentURI = FileProvider.getUriForFile(context, "com.minutecodes.openote.fileprovider", pickedFile)

val out = contentResolver.openOutputStream(fileContentURI)
val inStream = contentResolver.openInputStream(clipItem!!.uri)


val byteArray: ByteArray = inStream!!.readBytes()
pickedFile.writeBytes(byteArray)


lastProgress += actualProgress
progressUpdater!!.onProgressUpdate(lastProgress, clipSize)
clipSize -= 1

out!!.flush()
out.close()
inStream.close()


return





@SuppressLint("SimpleDateFormat")
@Throws(IOException::class)
private fun createPrivateFile(fileExtension: String): File

val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss").format(System.currentTimeMillis())
@Suppress("JoinDeclarationAndAssignment") val storageDir: File?
val newFile: File?
var extension: String = fileExtension


if (fileExtension == "plain")
extension = "txt"

storageDir = weakContextReference.get()!!.getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS)
if (!storageDir!!.exists())
storageDir.mkdirs()

newFile = File(storageDir,"FILE_$timeStamp.$extension")

return newFile





Expected Result: If 6 files are picked, six files should be created and fed with byteArray.



Actual Result: If 6 files are picked, it created often 3 files so only 3 selected files are copied. If 20 files are picked, about 11-13 files are copied.



Unfortunately, consistency is not always attained and random number of selected files are copied.



As far as I have tested, the problem lies within file creation not file copying.



Logcat



2019-03-23 18:14:53.932 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 0
2019-03-23 18:14:53.951 19579-19666/com.minutecodes.openote D/FILE TYPE: jpeg
2019-03-23 18:14:53.963 19579-19666/com.minutecodes.openote D/FILE CREATION: SUCCESFUL
2019-03-23 18:14:54.001 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 1
2019-03-23 18:14:54.009 19579-19666/com.minutecodes.openote D/FILE TYPE: aac
2019-03-23 18:14:54.016 19579-19666/com.minutecodes.openote D/FILE CREATION: SUCCESFUL
2019-03-23 18:14:54.133 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 2
2019-03-23 18:14:54.137 19579-19666/com.minutecodes.openote D/FILE TYPE: aac
2019-03-23 18:14:54.142 19579-19666/com.minutecodes.openote D/FILE CREATION: NOT SUCCESFUL
2019-03-23 18:14:54.195 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 3
2019-03-23 18:14:54.197 19579-19666/com.minutecodes.openote D/FILE TYPE: mpeg
2019-03-23 18:14:54.201 19579-19666/com.minutecodes.openote D/FILE CREATION: SUCCESFUL
2019-03-23 18:14:54.251 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 4
2019-03-23 18:14:54.257 19579-19666/com.minutecodes.openote D/FILE TYPE: aac
2019-03-23 18:14:54.263 19579-19666/com.minutecodes.openote D/FILE CREATION: NOT SUCCESFUL


The following Logcat was captured when 6 items were selected. As you can see, sometimes file creation is not successful, and hence I'm not able to copy files.










share|improve this question
























  • Try to add a small delay in between the creations of files to see if the succes ratio increases and to pin down the exact problem.

    – MwBakker
    Mar 23 at 16:20













0












0








0








I have written a code that is supposed to copy file selected from Storage Access Framework and paste them in my app's private directory. But some files can not be created and copied.



How the code runs



The copy/paste and file creation work is handled by a background thread that I have created.



  1. Runnable class is fed with the clip(ClipData) received from SAF


  2. Thread is start()


  3. A for loop inside the Runnable class moves through clip using indexes


  4. On first iteration, file type is determined and sent to createPrivateFile() function.


  5. Function spits out a file of specified extension and pickedFile variable is set to it.


  6. openOutputStream() opens stream with the created file URI


  7. openInputStream() is fed with clip's URI.


  8. Bytes from inputStream is fed to the file using byteArray.


Unfortunately, in my case I do not have much options to opt for. I have searched for the problem for 2 days with no success.



class AttachmentReceiverRunnable internal constructor(private val clip: ClipData, context: Context) : Runnable 

private val weakContextReference = WeakReference(context)
private var progressUpdater: ProgressBarResultPublisher? = context as ProgressBarResultPublisher


override fun run()

Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND)

val context = weakContextReference.get()
val actualProgress: Int = 100 / clip.itemCount
var clipSize = clip.itemCount
val clipCount = (clip.itemCount) - 1
var lastProgress = 0
val contentResolver: ContentResolver = context!!.contentResolver


for (item: Int in 0 until clipCount)

val clipItem = clip.getItemAt(item)
val fileType = contentResolver.getType(clipItem.uri)
val extension = fileType!!.substringAfter("/")
Log.d("FILE TYPE", extension)


val pickedFile = createPrivateFile(extension)


if(pickedFile.createNewFile())
Log.d("FILE CREATION","SUCCESFUL")
else
Log.d("FILE CREATION"," NOT SUCCESFUL")


val fileContentURI = FileProvider.getUriForFile(context, "com.minutecodes.openote.fileprovider", pickedFile)

val out = contentResolver.openOutputStream(fileContentURI)
val inStream = contentResolver.openInputStream(clipItem!!.uri)


val byteArray: ByteArray = inStream!!.readBytes()
pickedFile.writeBytes(byteArray)


lastProgress += actualProgress
progressUpdater!!.onProgressUpdate(lastProgress, clipSize)
clipSize -= 1

out!!.flush()
out.close()
inStream.close()


return





@SuppressLint("SimpleDateFormat")
@Throws(IOException::class)
private fun createPrivateFile(fileExtension: String): File

val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss").format(System.currentTimeMillis())
@Suppress("JoinDeclarationAndAssignment") val storageDir: File?
val newFile: File?
var extension: String = fileExtension


if (fileExtension == "plain")
extension = "txt"

storageDir = weakContextReference.get()!!.getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS)
if (!storageDir!!.exists())
storageDir.mkdirs()

newFile = File(storageDir,"FILE_$timeStamp.$extension")

return newFile





Expected Result: If 6 files are picked, six files should be created and fed with byteArray.



Actual Result: If 6 files are picked, it created often 3 files so only 3 selected files are copied. If 20 files are picked, about 11-13 files are copied.



Unfortunately, consistency is not always attained and random number of selected files are copied.



As far as I have tested, the problem lies within file creation not file copying.



Logcat



2019-03-23 18:14:53.932 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 0
2019-03-23 18:14:53.951 19579-19666/com.minutecodes.openote D/FILE TYPE: jpeg
2019-03-23 18:14:53.963 19579-19666/com.minutecodes.openote D/FILE CREATION: SUCCESFUL
2019-03-23 18:14:54.001 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 1
2019-03-23 18:14:54.009 19579-19666/com.minutecodes.openote D/FILE TYPE: aac
2019-03-23 18:14:54.016 19579-19666/com.minutecodes.openote D/FILE CREATION: SUCCESFUL
2019-03-23 18:14:54.133 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 2
2019-03-23 18:14:54.137 19579-19666/com.minutecodes.openote D/FILE TYPE: aac
2019-03-23 18:14:54.142 19579-19666/com.minutecodes.openote D/FILE CREATION: NOT SUCCESFUL
2019-03-23 18:14:54.195 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 3
2019-03-23 18:14:54.197 19579-19666/com.minutecodes.openote D/FILE TYPE: mpeg
2019-03-23 18:14:54.201 19579-19666/com.minutecodes.openote D/FILE CREATION: SUCCESFUL
2019-03-23 18:14:54.251 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 4
2019-03-23 18:14:54.257 19579-19666/com.minutecodes.openote D/FILE TYPE: aac
2019-03-23 18:14:54.263 19579-19666/com.minutecodes.openote D/FILE CREATION: NOT SUCCESFUL


The following Logcat was captured when 6 items were selected. As you can see, sometimes file creation is not successful, and hence I'm not able to copy files.










share|improve this question
















I have written a code that is supposed to copy file selected from Storage Access Framework and paste them in my app's private directory. But some files can not be created and copied.



How the code runs



The copy/paste and file creation work is handled by a background thread that I have created.



  1. Runnable class is fed with the clip(ClipData) received from SAF


  2. Thread is start()


  3. A for loop inside the Runnable class moves through clip using indexes


  4. On first iteration, file type is determined and sent to createPrivateFile() function.


  5. Function spits out a file of specified extension and pickedFile variable is set to it.


  6. openOutputStream() opens stream with the created file URI


  7. openInputStream() is fed with clip's URI.


  8. Bytes from inputStream is fed to the file using byteArray.


Unfortunately, in my case I do not have much options to opt for. I have searched for the problem for 2 days with no success.



class AttachmentReceiverRunnable internal constructor(private val clip: ClipData, context: Context) : Runnable 

private val weakContextReference = WeakReference(context)
private var progressUpdater: ProgressBarResultPublisher? = context as ProgressBarResultPublisher


override fun run()

Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND)

val context = weakContextReference.get()
val actualProgress: Int = 100 / clip.itemCount
var clipSize = clip.itemCount
val clipCount = (clip.itemCount) - 1
var lastProgress = 0
val contentResolver: ContentResolver = context!!.contentResolver


for (item: Int in 0 until clipCount)

val clipItem = clip.getItemAt(item)
val fileType = contentResolver.getType(clipItem.uri)
val extension = fileType!!.substringAfter("/")
Log.d("FILE TYPE", extension)


val pickedFile = createPrivateFile(extension)


if(pickedFile.createNewFile())
Log.d("FILE CREATION","SUCCESFUL")
else
Log.d("FILE CREATION"," NOT SUCCESFUL")


val fileContentURI = FileProvider.getUriForFile(context, "com.minutecodes.openote.fileprovider", pickedFile)

val out = contentResolver.openOutputStream(fileContentURI)
val inStream = contentResolver.openInputStream(clipItem!!.uri)


val byteArray: ByteArray = inStream!!.readBytes()
pickedFile.writeBytes(byteArray)


lastProgress += actualProgress
progressUpdater!!.onProgressUpdate(lastProgress, clipSize)
clipSize -= 1

out!!.flush()
out.close()
inStream.close()


return





@SuppressLint("SimpleDateFormat")
@Throws(IOException::class)
private fun createPrivateFile(fileExtension: String): File

val timeStamp: String = SimpleDateFormat("yyyyMMdd_HHmmss").format(System.currentTimeMillis())
@Suppress("JoinDeclarationAndAssignment") val storageDir: File?
val newFile: File?
var extension: String = fileExtension


if (fileExtension == "plain")
extension = "txt"

storageDir = weakContextReference.get()!!.getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS)
if (!storageDir!!.exists())
storageDir.mkdirs()

newFile = File(storageDir,"FILE_$timeStamp.$extension")

return newFile





Expected Result: If 6 files are picked, six files should be created and fed with byteArray.



Actual Result: If 6 files are picked, it created often 3 files so only 3 selected files are copied. If 20 files are picked, about 11-13 files are copied.



Unfortunately, consistency is not always attained and random number of selected files are copied.



As far as I have tested, the problem lies within file creation not file copying.



Logcat



2019-03-23 18:14:53.932 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 0
2019-03-23 18:14:53.951 19579-19666/com.minutecodes.openote D/FILE TYPE: jpeg
2019-03-23 18:14:53.963 19579-19666/com.minutecodes.openote D/FILE CREATION: SUCCESFUL
2019-03-23 18:14:54.001 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 1
2019-03-23 18:14:54.009 19579-19666/com.minutecodes.openote D/FILE TYPE: aac
2019-03-23 18:14:54.016 19579-19666/com.minutecodes.openote D/FILE CREATION: SUCCESFUL
2019-03-23 18:14:54.133 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 2
2019-03-23 18:14:54.137 19579-19666/com.minutecodes.openote D/FILE TYPE: aac
2019-03-23 18:14:54.142 19579-19666/com.minutecodes.openote D/FILE CREATION: NOT SUCCESFUL
2019-03-23 18:14:54.195 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 3
2019-03-23 18:14:54.197 19579-19666/com.minutecodes.openote D/FILE TYPE: mpeg
2019-03-23 18:14:54.201 19579-19666/com.minutecodes.openote D/FILE CREATION: SUCCESFUL
2019-03-23 18:14:54.251 19579-19666/com.minutecodes.openote D/FOR LOOP RUNNING: 4
2019-03-23 18:14:54.257 19579-19666/com.minutecodes.openote D/FILE TYPE: aac
2019-03-23 18:14:54.263 19579-19666/com.minutecodes.openote D/FILE CREATION: NOT SUCCESFUL


The following Logcat was captured when 6 items were selected. As you can see, sometimes file creation is not successful, and hence I'm not able to copy files.







android file kotlin copy storage-access-framework






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 23 at 16:22









Zoe

14.6k85688




14.6k85688










asked Mar 23 at 13:19









mcPlaymcPlay

1




1












  • Try to add a small delay in between the creations of files to see if the succes ratio increases and to pin down the exact problem.

    – MwBakker
    Mar 23 at 16:20

















  • Try to add a small delay in between the creations of files to see if the succes ratio increases and to pin down the exact problem.

    – MwBakker
    Mar 23 at 16:20
















Try to add a small delay in between the creations of files to see if the succes ratio increases and to pin down the exact problem.

– MwBakker
Mar 23 at 16:20





Try to add a small delay in between the creations of files to see if the succes ratio increases and to pin down the exact problem.

– MwBakker
Mar 23 at 16:20












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55314138%2ferror-in-creating-and-copying-selected-files%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55314138%2ferror-in-creating-and-copying-selected-files%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript