return $r; } /** * @param int $page 页数 * @param int $pagesize 每页显示数量 * @return mixed */ function link_find($page = 1, $pagesize = 100) { $arr = link__find($cond = array(), array('rank' => -1), $page, $pagesize); return $arr; } /** * @param $id * @return bool 返回FALSE失败 TRUE成功 */ function link_delete($id) { if (empty($id)) return FALSE; $r = link__delete(array('id' => $id)); link_delete_cache(); return $r; } //--------------------------kv + cache-------------------------- /** * @return mixed 返回全部友情链接 */ function link_get($page = 1, $pagesize = 100) { $g_link = website_get('friends_link'); if (empty($g_link)) { $g_link = link_find($page, $pagesize); $g_link AND website_set('friends_link', $g_link); } return $g_link; } // delete kv and cache function link_delete_cache() { website_set('friends_link', ''); return TRUE; } ?>amazon s3 - gcloudrsync to s3 causes incorrect content type - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

amazon s3 - gcloudrsync to s3 causes incorrect content type - Stack Overflow

programmeradmin1浏览0评论

i'm trying to move a few thousand files from a GCP bucket to an S3 bucket using the gcloud cli - authentication works fine, as does moving the files themselves, however gcloud storage rsync doesn't seem to maintain the Content-Type of files when they're pushed in to S3.

i've checked the object metadata in GCP Cloud Storage, and it correctly displays image/png as the content type - but after being moved to S3 the Content-Type is the default application/octet-stream in the object metadata.

i'm executing the transfer from my local macOS machine, but don't imagine it has issues recognizing mime types (correct me if i'm wrong!). not sure if it's something i'm missing (reviewed the gcloud storage rsync flags and can't seem to find anything that works) or if there's a better tool for the job, but open to trying anything.

AWS_PROFILE=my-profile gcloud storage rsync \
gs://SOURCE_BUCKET \
s3://DEST_BUCKET/legacy \
--delete-unmatched-destination-objects \
--skip-if-dest-has-newer-mtime \
--recursive
发布评论

评论列表(0)

  1. 暂无评论