You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$self->render_file(
'filepath' => $csv_file,
'content_disposition' =>'attachment;filename='.$dataset_name.'.csv',
'cleanup' => 1, # delete file after completed
);
`original bytes 4633400` (file produce on source by Linux `ls -la`) (Linux has returned me the file size on disk whereas Perl has returned me the file size of the actual content.)
`bytes sent 4628480` <= (verified with (Mojo::Asset::File->new( path => $filepath ); print $asset->size;)
`original wc -l 50001`
`received file wc -l 49949`
* When checking the source file size using Perl it's the same as the bytes sent.
but on receiving end the file content is getting truncated when compared to the source file and destination file,
I am missing something?
due to a content-length mismatch.
The file content of CSV is getting truncated automatically.
I found the content length getting set differently from the actual file size.
the plugin is using the size from the Mojo::Asset::File whereas the actual size of a file remains a little higher than the content length.
did I miss something or does the plugin need to get content size differently?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Trying to render file using
RenderFile Plugin
due to a content-length mismatch.
The file content of CSV is getting truncated automatically.
I found the content length getting set differently from the actual file size.
the plugin is using the size from the Mojo::Asset::File whereas the actual size of a file remains a little higher than the content length.
did I miss something or does the plugin need to get content size differently?
Beta Was this translation helpful? Give feedback.
All reactions